Answers for "push method in array is used for"

44

array push method

let array = ["A", "B"];
let variable = "what you want to add";

//Add the variable to the end of the array
array.push(variable);

//===========================
console.log(array);
//output =>
//["A", "B", "what you want to add"]
Posted by: Guest on April-26-2020

Code answers related to "push method in array is used for"

Code answers related to "Javascript"

Browse Popular Code Answers by Language