DEV Community

Discussion on: I Use For Loops Almost Always In Javascript

Collapse
 
albertomontalesi profile image
AlbertoM

I rarely use reduce because I never remember how to use it lol. The reason why I would use filter or map over a normal loop is for readability. If I see a filter I can already guess what I was trying to do in that part of the code rather than seeing a for loop and guessing. That being said I'm not working on large data so performance is never really a big concern.