add value to array javascript

JavaScript
var array = [];
var element = "anything you want in the array";
array.push(element); // array = [ "anything you want in the array" ]var fruits = ["Banana", "Orange", "Apple", "Mango"];

fruits.push("Kiwi"); // 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]array.push(element)var fruits = ["222", "vvvv", "eee", "eeee"];

fruits.push("Kiwi"); 
Source

Also in JavaScript: