freeCodeCamp/guide/spanish/certifications/javascript-algorithms-and-d.../basic-javascript/manipulate-arrays-with-push/index.md

13 lines
321 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Manipulate Arrays With push()
localeTitle: Manipular matrices con empuje ()
---
## Manipular matrices con empuje ()
El método `push()` permite agregar (agregar al final) un elemento a una matriz. Al igual que…
```javascript
var arr = [1, 2, 3, 4];
arr.push(5); // Now, the array is [1, 2, 3, 4, 5]
```