Skip to content

Instantly share code, notes, and snippets.

@FlorianWendelborn
Created May 3, 2017 20:42
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 FlorianWendelborn/0ec66324f8d4d3cc5d722183a0e0e687 to your computer and use it in GitHub Desktop.
Save FlorianWendelborn/0ec66324f8d4d3cc5d722183a0e0e687 to your computer and use it in GitHub Desktop.
const add=(x,...r)=>x+(+r?r[0]:add(...r));
console.log(add(1,2,3,4,5,6));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment