array-reduce Flashcards
1
Q
What is Array.prototype.reduce useful for?
A
To execute a callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result is a single value.