Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as JavaScript by kkhan ( 9 years ago )
first =1;
second=1;
current = 0;
console.log(first);
console.log(second);

function fibonacciNum( n){
  for(i=3;i<=n;i++){
    current = first+second;
    console.log(current);
    first = second;
    second = current;
}
}

console.log(fibonacciNum(10));

 

Revise this Paste

Your Name: Code Language: