Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #array #javascript
ADD COMMENT
Topic
Name
8+7 =