how to append to array code example
Example 1: javascript append to array
var colors=["red","white"];
colors.push("blue");
Example 2: pushing element in array in javascript
array = ["hello"]
array.push("world");
Example 3: js push array
var array = [];
var element = "anything you want in the array";
array.push(element);
Example 4: javascript array push
var fruits = [ "Orange", "Apple", "Mango"];
fruits.push("Banana");
Example 5: how to append to an array
var arr = [
"Hi",
"Hello",
"Bonjour"
];
arr.push("Hola");
console.log(arr);