generate a sequence numbers between a range javascript code example
Example 1: generate a sequence numbers between a range javascript
Array.from({length: 20}, (x, i) => i);
Example 2: generate a sequence numbers between a range javascript
Array.from(new Array(20), (x, i) => i + *lowerBound*);
Example 3: generate a sequence numbers between a range javascript
[...Array(5).keys()];
=> [0, 1, 2, 3, 4]