const arr = Array.from({ length: 10 });
console.log(arr); //[undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined]
const arr2 = arr.map((item) => 1);
console.log(arr2); //[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]