I recently wrote this code snippet:
let nums= Array.from({length:7},(curr,i)=> { console.log(curr,i); i+1;})
console.log(nums); // which results in [undefined *7]
I am puzzled as to why the array nums is not initialized with numbers from 1 to 7?