Skip to content

Instantly share code, notes, and snippets.

@jarbaspsf
Created February 3, 2018 00:36
Show Gist options
  • Save jarbaspsf/aa767f0691e50c866372690c2b2e78e3 to your computer and use it in GitHub Desktop.
Save jarbaspsf/aa767f0691e50c866372690c2b2e78e3 to your computer and use it in GitHub Desktop.
exemplo reduce ES6
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