Created
January 25, 2013 23:25
-
-
Save fastmover/4638840 to your computer and use it in GitHub Desktop.
Fibonacci Numbers (first 100)
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
fn = function() { | |
x = 0 | |
y = 1 | |
prev = 1; | |
for(z = 0; z < 100; z++) | |
{ | |
prev = x; | |
x = y; | |
y = prev + x; | |
console.log(y); | |
} | |
}; | |
fn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment