how to append to the array in js code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: pushing to an array
array = ["hello"]
array.push("world");
console.log(array);
//output =>
["hello", "world"]