Skip to content

Instantly share code, notes, and snippets.

@nurfarazi
Created June 21, 2017 15:53
Show Gist options
  • Save nurfarazi/f574d17026c683857dd7af9e72805fbe to your computer and use it in GitHub Desktop.
Save nurfarazi/f574d17026c683857dd7af9e72805fbe to your computer and use it in GitHub Desktop.
var scores = [4, 13, 2, 66, 12, 5];
var result = scores.reduce((total, score) => total + score) / scores.length;
console.log(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment