Created
October 3, 2011 19:32
-
-
Save cadwallion/1260003 to your computer and use it in GitHub Desktop.
Cures Cancer
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 real_fib(n) { | |
var i; | |
var fibs = new Array(0, 1); | |
for(i=0; i<n; i++) { | |
fibs.push(fibs[0] + fibs[1]); | |
fibs.shift(); | |
} | |
return fibs[0]; | |
} | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type' : 'text/plain'}); | |
res.end(real_fib(40) + ''); | |
}).listen(1337); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment