Skip to content

Instantly share code, notes, and snippets.

@hadaytullah
Last active October 25, 2019 09:23
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 hadaytullah/18ad18ced976b986584bb05d77fd32ee to your computer and use it in GitHub Desktop.
Save hadaytullah/18ad18ced976b986584bb05d77fd32ee to your computer and use it in GitHub Desktop.
Fibonacci series generator
var fibo=function(n){
var resp=[],previous=0, current=1;
while(current<n){
var currentCopy=current;
console.log(current);
current= previous + current;
previous=currentCopy;
}
}
fibo(10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment