js array.puch code example
Example 1: js array add element
array.push(element)
Example 2: pushing to an array
array = ["hello"]
array.push("world");
console.log(array);
//output =>
["hello", "world"]
array.push(element)
array = ["hello"]
array.push("world");
console.log(array);
//output =>
["hello", "world"]