Skip to content

Commit d0e1ba9

Browse files
Update Maths/AverageMean.js
Co-authored-by: Lars Müller <[email protected]>
1 parent 252ff10 commit d0e1ba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Maths/AverageMean.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const mean = (nums) => {
1313
throw new TypeError('Invalid Input')
1414
}
1515

16-
return nums.reduce((sum, cur) => sum + cur / nums.length, 0)
16+
return nums.reduce((sum, cur) => sum + cur, 0) / nums.length
1717
}
1818

1919
export { mean }

0 commit comments

Comments
 (0)