add element to the array javascript code example
Example 1: js add item to array
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Kiwi");
Example 2: javascript add element to array
var colors= ["red","blue"];
colors.push("yellow"); //["red","blue","yellow"]