Hint
Array.from({length:n}, (_, i) => expr) is the idiomatic way to create filled arrays of specific length.
const zeros = Array.from({ length: 3 }, () => 0);
const range = Array.from({ length: 5 }, (_, i) => i + 1);
console.log(zeros.join(','));
console.log(range.join(','));0,0,0 1,2,3,4,5
Explanation: Array.from with a length property creates an array. The second argument maps each element — _ is the value (undefined), i is the index.
Key Insight: Array.from({length:n}, (_, i) => expr) is the idiomatic way to create filled arrays of specific length.