WeCodeAcademy

Sum the numbers in an array

reduce() folds the array into one value. Start the total at 0.

Examplejavascript
Open in editor »

More JavaScript recipes