js append element in array code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: append item to array javascript
arr.push(item);
var colors= ["red","blue"];
colors.push("yellow");
arr.push(item);