Last active
August 29, 2015 14:21
-
-
Save sergiors/726970cb3a7beb96d7d2 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
// before | |
var fib = function(n) { | |
if (n <= 1) { | |
return n; | |
} | |
else { | |
return fib(n - 1) + fib(n - 1); | |
} | |
}; | |
// after | |
var fib = function(n) { | |
if (n <= 1) { | |
return n; | |
} | |
return fib(n - 1) + fib(n - 1); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment