re: The Holy Trinity of Functional Programming: Map, Filter and Reduce VIEW POST

FULL DISCUSSION
 

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.

 

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 :)

code of conduct - report abuse