Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to create an array in javascript

// Ways to create an array in javascript
const stuff = [element1, element2, ...]; // array literal notation
const stuff = new Array(element1, element2, ...); // array object notation
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #create #array #javascript
ADD COMMENT
Topic
Name
7+5 =