Answers for "how to add variables to an array"

0

how to add variables to an array

// how to add variables/string/value to an array in Javascript

const addArray = [
  "Hello",
  "My",
  "Name",
  "is"
];

// add/append new value/variable/string to the array
addArray.push("Chetan");

console.log(addArray);
Posted by: Guest on December-27-2021

Code answers related to "how to add variables to an array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language