javascript add to array
snippet in javascript

javascript add to array

user7729

var colors=["red","white"];
colors.push("blue");//append 'blue' to colors

append array js

user815

var colors= ["red","blue"];
	colors.push("yellow"); //["red","blue","yellow"]

javascript append element to array

user2653

var colors= ["red","blue"];
	colors.push("yellow"); 

js array add element

user1817

array.push(element)

js add item to array

user3487

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Kiwi");

add item to list javascript

user499

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Kiwi"); // Fruits = ["Banana", "Orange", "Apple", "Mango", "Kiwi"];