11. Review


#1

var omega = true

for (i=0;i<omega.length;i++){
    console.log('Finally finished');
}

while(omega){
    console.log('This one was pretty easy');
    omega=false;
}

do{
    console.log('This one sucked')
} while(omega===false);

getting 'SyntaxError:Unexpected token =' but I've reviewed it a couple times and can't find any unnecessary or misplaced = signs


#2

i get an infinity loop if i run your code.

the problem is, that in yourwhile loop you set omega to false, so in your do while loop this condition:

while(omega===false);

is true, and it won't change, so you have an infinity loop


#3

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