javascript create array from 0 to n code example
Example 1: js array of 1 to n
[...Array(10).keys()]
Example 2: es6 create array with increasing number
Array.from(Array(10).keys())
//=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Example 3: how to make an array of a value from 1 to the number
[ ...Array(N).keys() ].map( i => i+1);