add an element to the end of the array js code example
Example 1: js array add element
array.push(element)
Example 2: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
array.push(element)
var colors= ["red","blue"];
colors.push("yellow");