Answers for "new array and add element"

0

how to make and add to an array in javascript

var arrayExample = [53,'Hello World!'];
console.log(arrayExample) //Output =>
[53,'Hello World!']

//You can also do this
arrayExample.push(true);

console.log(arrayExample); //Output =>
[53,'Hello World!',true];
Posted by: Guest on December-28-2020

Code answers related to "new array and add element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language