Created
March 21, 2020 13:36
-
-
Save flavioribeirojr/15af286fd8c1771ff440cfa84e998fdf to your computer and use it in GitHub Desktop.
Reducer basic example
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 numbers = [5, 10, 15]; | |
const sum = numbers.reduce((sum, number) => sum + number, 0) | |
// sum = 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment