Here's Why Mapping a Constructed Array in JavaScript Doesn't Work

added by JavaScript Kicks
6/18/2018 7:45:13 AM

529 Views

And How To Do It Correctly For the sake of demonstration, suppose you need to generate an array of numbers from 0 to 99. How might you do this? Here's one option: const arr = []; for (let i = 0; i i); console.log(arr[0] === undefined); // true What the h*ck!?


0 comments