Basic JavaScript (43/111) | Manipulate Arrays With push | freeCodeCamp
An easy way to append data to the end of an array is via the push() function.
.push() takes one or more parameters and "pushes" them onto the end of the array.
Examples:
var arr1 = [1,2,3];
arr1.push(4);
// arr1 is now [1,2,3,4]
var arr2 = ["Stimpson", "J", "cat"];
arr2.push(["happy", "joy"]);
// arr2 now equals ["Stimpson", "J", "cat", ["happy", "joy"]]
Push ["dog", 3] onto the end of the myArray variable.
https://www.freecodecamp.org/learn/ja...
Смотрите видео Basic JavaScript (43/111) | Manipulate Arrays With push | freeCodeCamp онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Stral Tech 04 Сентябрь 2020. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 372 раз и оно понравилось 3 посетителям.