1some_array = ["John", "Sally"];
2some_array.push("Mike");
3
4console.log(some_array); //output will be =>
5["John", "Sally", "Mike"]
1var someArray = ["Item 1", "Item 2"];
2
3// Add a variable, string, number, or boolean to the array list
4someArray.push("Item 3");
5
6console.log(someArray);
7// This '.push()' method modifies the array to become something like this
8// someArray = ["Item 1", "Item 2", "Item 3"];
9
10// ===============================================================
11// You could also push more than one item into an array. Like this:
12var mainArray = ["Doe", "mizpah", "Tsukuyomi"];
13
14mainArray.push("Katara", 54, false, true);
15
16console.log(mainArray);
17// Result >>>
18// mainArray = ["Doe", "mizpah", "Tsukuyomi", "Katara", 54, false, true]