add element to array javascript

JavaScript
array.push(element)// initialize array
var arr = [
  "Hi",
  "Hello",
  "Bonjour"
];

// append new value to the array
arr.push("Hola");

console.log(arr);const arr1 = [1,2,3]
const newValue = 4
const newData = [...arr1, obj] // [1,2,3,4]var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Kiwi");var colors= ["red","blue"];
	colors.push("yellow"); //["red","blue","yellow"]var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
Source

Also in JavaScript: