how to add an elemnt ot an 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);