Answers for "create array and push in javascript"

7

pushing element in array in javascript

array = ["hello"]
array.push("world");
Posted by: Guest on May-10-2020
44

push array javascript

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 "create array and push in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language