Skip to content

Instantly share code, notes, and snippets.

@willyg302
Created January 7, 2015 02:02
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 willyg302/9213e3afa774b436edbf to your computer and use it in GitHub Desktop.
Save willyg302/9213e3afa774b436edbf to your computer and use it in GitHub Desktop.
// fib(): Calculates the nth Fibonacci number.
// - n: The number to calculate
return function(n, a, b) {
return n > 0 ? arguments.callee(n - 1, b, a + b) : a;
}(n, 0, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment