After creating my own solution, I read through the solutions for " Functional Programming: Use the reduce Method to Analyze Data" learn more ways or better ways of solving the challenge.
After reading and doing my best to understand “Solution 3,” I realized that the function returns “averageRating” which, at this point, is an object containing property value pairs:
return averageRating;
which returns {sum: 34.7, count: 4}
If I’m correct, this is what the return statement should be:
return averageRating.sum / averageRating.count;
If I’m wrong, I apologize.
But if I’m right, please let the person or people who are responsible for editing the code know so that they can make the correction.