1var colors=["red","white"];
2colors.push("blue");//append 'blue' to colors
1var fruits = ["Orange", "Apple", "Mango"];
2var moreFruits = ["Banana", "Lemon", "Kiwi"];
3
4fruits.push(...moreFruits);
5//fruits => ["Orange", "Apple", "Mango", "Banana", "Lemon", "Kiwi"]
6
1//adding items to array
2objects = [];
3objects.push("you can add a string,number,boolean,etc");
4//if you more stuff in a array
5//before i made a error doing value = : value
6objects.push({variable1 : value, variable2 : value);
7//we do the {} so we tell it it will have more stuff and the variable : value
8
1// initialize array
2var arr = [
3 "Hi",
4 "Hello",
5 "Bonjour"
6];
7
8// append new value to the array
9arr.push("Hola");
10
11console.log(arr);