Doh. What I think I meant to say, was can I use += here? I.E. (sumOfRatings, rating) => rating+=;
Instead of ```(sumOfRatings, rating) => sumOfRatings + rating;
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.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.