DEV Community

Discussion on: You don't need Array.reduce()

Collapse
 
pureooze profile image
Uzair Shamim

One of the reasons I like using reduce is because it prevents accidental mutation of the the original array and it is consistent with how it works and looks (in fact this applies to the other array methods like map and filter).