Skip to content

Instantly share code, notes, and snippets.

@infinito84
Last active August 29, 2015 14:10
Show Gist options
  • Save infinito84/161f75689b69aa970e95 to your computer and use it in GitHub Desktop.
Save infinito84/161f75689b69aa970e95 to your computer and use it in GitHub Desktop.
var fibonacci=function(ant,sig,i,max){
if(i<max){
return fibonacci(sig,ant+sig,++i,max);
}
return ant;
}
function main(n){
return fibonacci(1,1,0,n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment