Skip to content

Instantly share code, notes, and snippets.

@granmoe
Last active April 16, 2018 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save granmoe/8a3eebd74972a2e1f345772a4ff67caf to your computer and use it in GitHub Desktop.
Save granmoe/8a3eebd74972a2e1f345772a4ff67caf to your computer and use it in GitHub Desktop.
const reducer = (accum, current) => accum + current
const initialValue = 0
const list = [1, 2, 3]
reduce(reducer, initialValue, list) // 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment