Skip to content

Instantly share code, notes, and snippets.

@JohnMGant
Created August 7, 2020 17:44
Show Gist options
  • Select an option

  • Save JohnMGant/5e714db87c2e41eb8a517d9d6fd91a9f to your computer and use it in GitHub Desktop.

Select an option

Save JohnMGant/5e714db87c2e41eb8a517d9d6fd91a9f to your computer and use it in GitHub Desktop.
Add an array of integers using Reduce
function Add(values) {
return values.reduce((sum, val) => sum += val)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment