Very nice. However, I wonder why do you used `_.reduce` instead of map or forEach in you example.
Guillermo Perez Farquharson
801

Thanks Guillermo!

Since I’m using lodash, I could use ‘_.map’. In case of lodash ‘map’ always creates an array, even if it runs on object.

To emphasize that I’m changing structure (object -> array), I use ‘reduce’. In functional programming ‘map’ is not changing the structure but just maps each element & leaves structure as is.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.