Skip to content

Instantly share code, notes, and snippets.

@theWhiteFox
Last active January 14, 2018 12:16
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 theWhiteFox/aef4564d9fb76d2c833068fe2e4f003e to your computer and use it in GitHub Desktop.
Save theWhiteFox/aef4564d9fb76d2c833068fe2e4f003e to your computer and use it in GitHub Desktop.
// recursive starts at 0
function fib(number) {
if(number == 0) return 0;
if(number == 1) return 1;
return fib(number - 2) + fib(number - 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment