Created
August 11, 2015 11:52
-
-
Save varavut/085cf332bfe00d5af084 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
function F(n){ | |
var a = 0; | |
var b = 1; | |
var result = 0; | |
for(var i=2; i<=n; i++){ | |
result = a + b; | |
a = b; | |
b = result; | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment