You can use the `new Array(60);` to make an array of length 60. Then append the `fill("")` to fill they array with empty strings. After that you can `map()` the index of each item to its value.
(Be aware that the index is zero based so you need to add one).
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
let arr = new Array(60).fill("").map((_, i) => i + 1);
arr.forEach(n => console.log(n));
// EDIT:
// By making it into a function you can call it with dynamic lengths
function makeNumArr(num) {
return new Array(num).fill("").map((_, i) => i + 1);
}
let fiveArr = makeNumArr(5);
let tenArr = makeNumArr(10);
<!-- end snippet -->
Detailed:
// Create array of length 60
let arr = new Array(60);
// Fill the whole array with a value, i chose empty strings
let filledArr = arr.fill("");
// Replace every value with it's index plus one. Index starts at 0 that's why we add one
let numArr = filledArr.map((_, i) => i + 1);