Skip to content

Instantly share code, notes, and snippets.

@samverneck
Last active May 11, 2017 04:07
Show Gist options
  • Select an option

  • Save samverneck/620cde4ca0e268781c6150fa52cf141e to your computer and use it in GitHub Desktop.

Select an option

Save samverneck/620cde4ca0e268781c6150fa52cf141e to your computer and use it in GitHub Desktop.
// media reduce
const array = [ 1, 2, 6, 7, 88, 45 ]
@samverneck
Copy link
Copy Markdown
Author

const total = [1, 2, 6, 7, 88, 45].reduce(function(a, b) {
    return a + b / 2;
});

@samverneck
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment