Skip to content

Instantly share code, notes, and snippets.

@maulberto3
Last active July 12, 2018 04:00
Show Gist options
  • Save maulberto3/997fc84e4447b6203122058aeb37cda5 to your computer and use it in GitHub Desktop.
Save maulberto3/997fc84e4447b6203122058aeb37cda5 to your computer and use it in GitHub Desktop.
Reduce example #1
const result = [0, 1, 2, 3, 4].reduce( (accum, curr) => accum + curr )
console.log('result is', result) // result is 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment