Stuck with this chapter.. please help


#1

i=0;
var count = function(){
    while(i<10){
        for(j=0;j<5;j++){
            console.log("the number is"+count);
        }
    }
};
count();

everytime i run this code, the window immediately unresponding.. i can't save & submit this code.. so, i stuck here and can't continue to the next lesson.


#2

You have an infinity loop. i is zero, and will stay zero, so:

while (i < 10)

is always true, causing an infinity loop


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.