I\'m looking for any alternatives to the below for creating a JavaScript array containing 1 through to N where N is only known at runt
1
N
the new way to filling Array is:
Array
const array = [...Array(5).keys()] console.log(array)
result will be: [0, 1, 2, 3, 4]
[0, 1, 2, 3, 4]