Created
May 13, 2018 18:01
-
-
Save dg92/4e1491f5ae4eee37ca8cb2ef9f713e90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// calculate the sum of array elements | |
const sum = (arr) => arr.reduce((total, item) => total += item, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment