Last active
September 27, 2019 20:59
-
-
Save simonpojok/b83b55224485bac39665b29f34f6e15f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fibonacci(inputNumber) { | |
if ( inputNumber <= 1 ) { | |
return 1; | |
} | |
return this.fibonacci(inputNumber - 1 ) + this.fibonacci(inputNumber - 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment