108
rated 0 times
[
109]
[
1]
/ answers: 1 / hits: 16838
/ 13 Years ago, wed, november 30, 2011, 12:00:00
Consider:
function fibo() {
var first, second, add;
for(var i=0; i<4000; i++) {
if(i === 0) {
first = 1;
second = 2;
}
add = first + second;
first = second;
second = add;
}
alert(add);
}
fibo();
It is not working and shows infinity. Why?
More From » fibonacci