Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create and fill array javascript

Array.from({length: 3}, (_, i) => i); //[0,1,2]
[...Array(3)].map((_, i) => i);      //[0,1,2]
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #create #fill #array #javascript
ADD COMMENT
Topic
Name
1+5 =