Created
February 3, 2018 00:36
-
-
Save jarbaspsf/aa767f0691e50c866372690c2b2e78e3 to your computer and use it in GitHub Desktop.
exemplo reduce ES6
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
let numeros = [1,2,3,4] | |
let soma = numeros.reduce((valorAnterior, valorAtual) => valorAnterior + valorAtual); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment