Array.reduce() Playground

Mr. Wiryo carries the accumulator along the train one wagon a step, and the platform’s chalk board keeps each value it held: a total, a maximum, a count, a…

The key idea

reduce rolls an array into one value

Try it in this playground