-
-
Save hedgejanuary/2afd1078e66c438ddbe045738e461044 to your computer and use it in GitHub Desktop.
This was my first code to calculate average score. - not working -
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
function averageScore(arr) { | |
var total; | |
for (var i = 0; i < arr.length; i++) { | |
total += arr[i]; | |
} | |
return total / arr.length; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment