Created
October 22, 2022 19:56
-
-
Save oguzhancvdr/cf74ba8f3c89a12b6b664f7211f49210 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const average = (arr) => arr.reduce((a, b) => a + b) / arr.length; | |
average([1,9,18,36]) //16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calculate the mean of an array