Skip to content

Instantly share code, notes, and snippets.

@hadaytullah
Last active Oct 25, 2019
Embed
What would you like to do?
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