Skip to content

Instantly share code, notes, and snippets.

@boolpath
Created December 1, 2013 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boolpath/7727706 to your computer and use it in GitHub Desktop.
Save boolpath/7727706 to your computer and use it in GitHub Desktop.
BogotaJS - Final
function fibonacci(n) {
var f = [1,1], j, p = f[0], s, i = n + 2;
for (j = 2; j < i; j++) {
s = f[j-1];
f.push(p + s);
p = s;
}
return f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment