Skip to content

Instantly share code, notes, and snippets.

@KimSarabia
Created October 16, 2017 21:52
Show Gist options
  • Save KimSarabia/11edb3cea7084bbf3f20468e97bc2582 to your computer and use it in GitHub Desktop.
Save KimSarabia/11edb3cea7084bbf3f20468e97bc2582 to your computer and use it in GitHub Desktop.
Summing an Array ES6
var sum = [1, 2, 3].reduce((a, b) => a + b, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment