Last active
July 12, 2018 04:00
-
-
Save maulberto3/997fc84e4447b6203122058aeb37cda5 to your computer and use it in GitHub Desktop.
Reduce example #1
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
const result = [0, 1, 2, 3, 4].reduce( (accum, curr) => accum + curr ) | |
console.log('result is', result) // result is 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment