Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var lstInt = [1, 2, 3, 4, 5];
var soma = lstInt.reduce(function(total, proximo) {
return total + proximo;
});
console.log(soma); //15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment