DEV Community

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

Collapse
 
elarcis profile image
Elarcis • Edited
Array.from({ length: 100 }, (_, i) => i);
Collapse
 
loilo profile image
Florian Reuschel

Whaaat.

I'm honestly baffled. Used Array.from() so often but never knew about the mapping argument. Well, today I learned. Thank you!

Collapse
 
sreisner profile image
Shawn Reisner

Well I'll be... Nice!