how to add an element at the and of an array code example
Example 1: how to add a new item in an array in javascript
let array = ["Chicago", "Los Angeles", "Calgary", "Seattle", ]
console.log(array)
array.push('New Item') < variable_name > .push( < What you want to add > )
console.log("This array has", array.length, "things in it")
Example 2: how to make and add to an array in javascript
var arrayExample = [53,'Hello World!'];
console.log(arrayExample)
[53,'Hello World!']
arrayExample.push(true);
console.log(arrayExample);
[53,'Hello World!',true];