DEV Community

Discussion on: Is reduce() bad?

Collapse
 
douglasbarbosadelima profile image
Douglas Barbosa de Lima

Too many times, reduce's could be replaced by simple 'for' command. In my vision, reduce command is fantastic, but, when not used correctly, turn the code bad to read and hard to maintain by another developers.

Collapse
 
jasterix profile image
Jasterix

100% right. As much as I love writing reduce(), I hate reading it. Go figure lol