Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Maths/AverageMean.js
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
  • Loading branch information
HRIDYANSHU054 and appgurueu authored Oct 10, 2024
commit d0e1ba9b0ba07ff203fc690cfafffac9df315327
2 changes: 1 addition & 1 deletion Maths/AverageMean.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const mean = (nums) => {
throw new TypeError('Invalid Input')
}

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

export { mean }