Skip to content

Instantly share code, notes, and snippets.

@sedera-tax
Created June 28, 2018 12:36
Show Gist options
  • Select an option

  • Save sedera-tax/74d42f5366c8994d51925352a83aad49 to your computer and use it in GitHub Desktop.

Select an option

Save sedera-tax/74d42f5366c8994d51925352a83aad49 to your computer and use it in GitHub Desktop.
Somme Array reduce
let myArray = [1, 2, 3];
let arraySum = myArray.reduce((previous, current) => previous + current);
console.log('Sum of array values is: ${arraySum}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment