Skip to content

Instantly share code, notes, and snippets.

@cadwallion
Created October 3, 2011 19:32
Show Gist options
  • Save cadwallion/1260003 to your computer and use it in GitHub Desktop.
Save cadwallion/1260003 to your computer and use it in GitHub Desktop.
Cures Cancer
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