js new array number code example
Example 1: create array javascript numbers
[...Array(5).keys()];
=> [0, 1, 2, 3, 4]
Example 2: create array with number js
var foo = new Array(45); // create an empty array with length 45
[...Array(5).keys()];
=> [0, 1, 2, 3, 4]
var foo = new Array(45); // create an empty array with length 45