Functional Programming - Use the reduce Method to Analyze Data

Doh. What I think I meant to say, was can I use += here? I.E. (sumOfRatings, rating) => rating+=;

Instead of ```(sumOfRatings, rating) => sumOfRatings + rating;

No because the function has to return the new value of the accumulator, that returns undefined.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.