DEV Community

Discussion on: Javascript's reduce method in a nutshell.

Collapse
 
jonrandy profile image
Jon Randy 🎖️

You didn't mention that the initial value is actually optional. If you omit it, the first value of the array is used, and the reduce proceeds from the next value

Collapse
 
amiinequ profile image
Amine Amhoume

Thanks for the reminder Jon. I had that in mind but didn't bother to put it but now I think I should.