paint-brush
Understanding map, filter and reduce in Javascriptby@luukgruijs
47,336 reads
47,336 reads

Understanding map, filter and reduce in Javascript

by Luuk GruijsJune 25th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

When working on <a href="https://hackernoon.com/tagged/javascript" target="_blank">Javascript</a> projects you inevitably come across situations where you have to do some data manipulation. You can always use a <code class="markup--code markup--p-code">for-loop</code> to get the desired result, but <code class="markup--code markup--p-code">for-loops</code> can quickly become a bit messy and large. Most of the times it can be much easier to use the <code class="markup--code markup--p-code">map</code>, <code class="markup--code markup--p-code">filter</code> or <code class="markup--code markup--p-code">reduce</code> operator. Your code stays cleaner and is easier to read. At least, if you understand how they work and when you should use them.
featured image - Understanding map, filter and reduce in Javascript
Luuk Gruijs HackerNoon profile picture
Luuk Gruijs

Luuk Gruijs

@luukgruijs

L O A D I N G
. . . comments & more!

About Author

Luuk Gruijs HackerNoon profile picture
Luuk Gruijs@luukgruijs

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite