We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 252ff10 commit d0e1ba9Copy full SHA for d0e1ba9
Maths/AverageMean.js
@@ -13,7 +13,7 @@ const mean = (nums) => {
13
throw new TypeError('Invalid Input')
14
}
15
16
- return nums.reduce((sum, cur) => sum + cur / nums.length, 0)
+ return nums.reduce((sum, cur) => sum + cur, 0) / nums.length
17
18
19
export { mean }
0 commit comments