Created
July 26, 2022 21:22
-
-
Save 3200pro/b6ab7996ef0fed1be377e39e946eec20 to your computer and use it in GitHub Desktop.
Calculate the average of an array
This file contains hidden or 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment