Created
December 20, 2021 18:32
-
-
Save paladinescamila/269aa2e824e8e31d415fc57eed0b547b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let numbers = [1,2,3,4,5]; | |
let reducer = (previus, current) => previus + current; | |
// sum = 15 | |
let sum = numbers.reduce(reducer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment