DEV Community

Discussion on: Javascript reduce 101

Collapse
 
kvsm profile image
Kevin Smith 🏴󠁧󠁢󠁳󠁣󠁴󠁿

A good example would be a reduce which does both a map and a filter - if you did the same with map, then filter, you'd have to iterate over the array twice.

Thread Thread
 
iggredible profile image
Igor Irianto

I updated the post to include a basic map/ filter case. Thank you so much for the suggestion!

I hope it conveys the point :)