how to add something in an array code example
Example 1: append an array
// initialize array
var arr = [
"Hi",
"Hello",
"Bonjour"
];
// append new value to the array
arr.push("Hola");
console.log(arr);
Example 2: how to add to an array
var ar = ['one', 'two', 'three'];
ar[3] = 'four'; // add new element to ar