DEV Community

Discussion on: The Holy Trinity of Functional Programming: Map, Filter and Reduce

Collapse
 
priitpu profile image
Priit • Edited

You put emphasis on the fact that map, filter and reduce go through every single element of the array, that being a theoretical con, compared to a for-loop. Yet your examples don't showcase the use-cases of breaking/continuing so currently the examples are more verbose versions of native methods.

Also for-of loop !== for loop.

Otherwise a good intro to more abstract methods.

Collapse
 
mlevkov profile image
Mikhail Levkovsky

Appreciate the feedback, good point that I didn't dig in how to break out of the for loop. I assumed people knew how to do it but thats maybe a faulty assumption.

Good point about the for-of loop !== for loop, will be more careful in the future :)