To append something to an array with JavaScript, we call the array push method.
For instance, we write
const arr = ["Hi", "Hello", "Bonjour"];
arr.push("Hola");
console.log(arr);
to call arr.push to append 'Hola' as the last entry of arr in place.