add last element to array js code example
Example 1: js add element to array
var fruits = [ "Orange", "Apple", "Mango"];
fruits.push("Banana");
Example 2: pushing element in array in javascript
array = ["hello"]
array.push("world");
var fruits = [ "Orange", "Apple", "Mango"];
fruits.push("Banana");
array = ["hello"]
array.push("world");