Skip to content

Instantly share code, notes, and snippets.

@radovansurlak
Last active April 1, 2017 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radovansurlak/ca8a200a1d334c5d13aa79191555af0d to your computer and use it in GitHub Desktop.
Save radovansurlak/ca8a200a1d334c5d13aa79191555af0d to your computer and use it in GitHub Desktop.
ES6 - Functional Programming Example
function addXNumbers () {
let numbers = Array.prototype.slice.call(arguments)
return numbers.reduce((acc, current) => acc + current)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment