Utwórz liczby JavaScript tablicy
[...Array(5).keys()];
=> [0, 1, 2, 3, 4]
Gifted Gorilla
[...Array(5).keys()];
=> [0, 1, 2, 3, 4]
var foo = new Array(45); // create an empty array with length 45
const arr = [...Array(2)] // output [undefined, undefined]