Rasi
answered Nov 30 '-1 00:00
if you using recursion than you need to choose one end of recursion . above code clearly says that it never end .
so try to use if or other condition statement to break the recursion
var d=0;
function increment(){
if(d==100){
return d;
}else {
d++;
return increment();
}
}
increment();
above code will stop recursion when it reach at 100 . recursion without end is useless .
its not function overflow , but misuse of recursion.