Skip to content

Instantly share code, notes, and snippets.

@erikjoens
Last active November 17, 2016 20:17
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 erikjoens/99a95b3ee5e069ca0db1f8ed15348e2e to your computer and use it in GitHub Desktop.
Save erikjoens/99a95b3ee5e069ca0db1f8ed15348e2e to your computer and use it in GitHub Desktop.
Recursive Fibonacci number generator
function fib(i) {
return i > 1 ? ( fib(i - 1) + fib(i - 2) ) : i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment