how to add element at end of array js code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: pushing element in array in javascript
array = ["hello"]
array.push("world");
var colors= ["red","blue"];
colors.push("yellow");
array = ["hello"]
array.push("world");