add element to array javasvcript code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: js append to array
var array = [0,1,3];
array.append(5);
console.log(array); // [0,1,3,5]
var colors= ["red","blue"];
colors.push("yellow");
var array = [0,1,3];
array.append(5);
console.log(array); // [0,1,3,5]