DEV Community

Luca
Luca

Posted on

JS map(), filter() & reduce() explained!

Just found this on the Internet. Worth a share /w you.

Top comments (5)

Collapse
 
curtisfenner profile image
Curtis Fenner

I like map and filter, but reduce doesn't really explain what's going on. eat isn't a function that takes two pieces of food (and if it is, after the first bite in this example one of those "food" is 💩)

Collapse
 
bigschatz profile image
bigschatz

Hi Luca,

This is a fantastic and fun way to explain these methods! You gave a very simple example that looks at the big picture.

Great job 👍

Collapse
 
kleene1 profile image
kleene1

Lol nice one haha 😄

Some comments may only be visible to logged-in visitors. Sign in to view all comments.