DEV Community

Discussion on: Quick Tip: Transform an Array into an Object using .reduce()

Collapse
 
hdennen profile image
Harry Dennen

That makes sense for .map(), but for .reduce() the previous value is also the accumulated value which will eventually be returned. Making that distinction in the naming convention is a nice visual cue imo.