DEV Community

Discussion on: 👨🏻‍💻 UnderStand the Most Powerful 💪 Function of Javascript

Collapse
 
daksamit profile image
Dominik Aksamit

I definitely agree that reduce is a powerful build-in javascript function.
When you once understand how it works, it's hard to refrain from using it.
You can do a lot more than map values of an array, flat an array, or transform arrays into objects.
I see only one significant disadvantage - readability. Sometimes it could be hard to read for other developers what we mean using reduce function.

Here is a great explanation - youtube.com/watch?v=qaGjS7-qWzg

Collapse
 
sharmakushal profile image
Kushal sharma

Thanks for the youtube link