append array js

JavaScript
var colors= ["red","blue"];
	colors.push("yellow"); var colors= ["red","blue"];
	colors.push("yellow"); //["red","blue","yellow"]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);var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
Source

Also in JavaScript: