Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Created August 29, 2017 21:36
Show Gist options
  • Save isacjunior/8e5b596344d927eecaa5024decb85f27 to your computer and use it in GitHub Desktop.
Save isacjunior/8e5b596344d927eecaa5024decb85f27 to your computer and use it in GitHub Desktop.
const numbers = [3, 1, 6]
const sum = numbers.reduce((sum, item) => sum + item)
console.log(sum) // 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment