const arr = Array.from({ length: 10 }, (v, i) => i + 1);

// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
const arr = Array(10).fill().map((_,i) => i + 1);

// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]