Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js array comprehension

//returns 0-9
[...Array(10).keys()]

//returns 1-10
[...Array(11).keys()].splice(1)
Source by www-lia.deis.unibo.it #
 
PREVIOUS NEXT
Tagged: #js #array #comprehension
ADD COMMENT
Topic
Name
8+9 =