DEV Community

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

Collapse
 
belinde profile image
Franco Traversaro

I don't agree... You know, you've just written an article about this approach not working with a naive approach 😁

That was obviously a joke, but still for me it's very hard to understand what that code do. And I feel a bit of horror thinking about the CPU cycles wasted with so many calls...

Thread Thread
 
sreisner profile image
Shawn Reisner

Not quite. I added the bit about the for loop being perfectly fine at the beginning of the article on purpose - because it is! I'm glad you found it thought provoking. I appreciate the feedback! ❤️