Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js range 1 to n

// this will return a range of numbers from 1 to n=20
Array.from({length: 20}, (_, i) => i + 1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #range
ADD COMMENT
Topic
Name
5+4 =