Skip to content

Instantly share code, notes, and snippets.

@SolidShake
Created November 15, 2015 11:57
Show Gist options
  • Select an option

  • Save SolidShake/2aa876599bd8ed55e9c9 to your computer and use it in GitHub Desktop.

Select an option

Save SolidShake/2aa876599bd8ed55e9c9 to your computer and use it in GitHub Desktop.
Simple calculation of Fibonacci numbers
data = [1, 1];
for (var i = 2; i < 11; i++) {
data.push(data[i-1] + data[i-2]);
console.log(data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment