Skip to content

Instantly share code, notes, and snippets.

@SeqviriouM
Created February 17, 2017 10:33
Show Gist options
  • Save SeqviriouM/0d723cadaeb97ed6e345a4fcf8aa6d0f to your computer and use it in GitHub Desktop.
Save SeqviriouM/0d723cadaeb97ed6e345a4fcf8aa6d0f to your computer and use it in GitHub Desktop.
Fibonacci
const fibonacci = (n) => {
if (n <= 2) {
return Number(!!n);
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment