Skip to content

Instantly share code, notes, and snippets.

@ramazankanbur
Created November 10, 2019 15:35
Show Gist options
  • Save ramazankanbur/c0d7853c84d35b5d89534876eb39f34a to your computer and use it in GitHub Desktop.
Save ramazankanbur/c0d7853c84d35b5d89534876eb39f34a to your computer and use it in GitHub Desktop.
var numbers = [10,20,30];
var result = numbers.reduce(function(sum, number){
return sum + number;
}, 17);
console.log(result);
//output
77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment