Course · Section 11: Working With Arrays · Lecture 156: Data Transformations: map, filter, reduce
Implement `average(nums)` returning the mean of the array, or `0` for an empty array.
+ 1 hidden test run on Submit.
Return 0 for an empty array, otherwise the sum divided by the count.
Run your code to see results.