Created
April 5, 2018 03:10
-
-
Save luzeduardo/fd717c8cda83af81534c443f63ad3d99 to your computer and use it in GitHub Desktop.
slowFib
This file contains hidden or 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
const slowFib = (n) => { | |
if (n < 2) { | |
return n | |
} | |
return slowFib(n — 1) + slowFib(n — 2) | |
} | |
export default slowFib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment