var colors=["red","white"]; colors.push("blue");//append 'blue' to colors
var colors= ["red","blue"]; colors.push("yellow");
arr.push(item);
// initialize array var arr = [ "Hi", "Hello", "Bonjour" ]; // append new value to the array arr.push("Hola"); console.log(arr);
arr = [1, 2, 3, 4] arr.push(5) // adds element to end arr.unshift(0) // adds element to beginning
let foo = ['oop','plop','copo']; foo.push("plop");
var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.push("Kiwi"); .cut-text { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }