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

444 B
Raw Blame History

title localeTitle
Manipulate Arrays With push() Манипулировать массивами С помощью push ()

Манипулировать массивами С помощью push ()

Метод push() позволяет добавить (добавить к концу) элемент в массив. Вот так…

var arr = [1, 2, 3, 4]; 
 arr.push(5); // Now, the array is [1, 2, 3, 4, 5]