Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Created August 30, 2017 16:58
Show Gist options
  • Save isacjunior/4779c6457c66e0a8ce3089c81071b390 to your computer and use it in GitHub Desktop.
Save isacjunior/4779c6457c66e0a8ce3089c81071b390 to your computer and use it in GitHub Desktop.
const sumSales = (accumalator, element) => accumalator + element.sales
const totalSales = users.reduce(sumSales, 0)
console.log(totalSales) // 49991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment