Skip to content

Instantly share code, notes, and snippets.

@gpDA
Created February 17, 2022 21:50
Show Gist options
  • Save gpDA/7d47cc162514d3f826227eb5798aee6a to your computer and use it in GitHub Desktop.
Save gpDA/7d47cc162514d3f826227eb5798aee6a to your computer and use it in GitHub Desktop.
function fibonacci(num) {
if(num < 2) {
return num;
}
else {
return fibonacci(num-1) + fibonacci(num - 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment