2. While Syntax

I didn’t understand the Error:
the code is

var understand = true;

while( understand === false ){
console.log(“I’m learning while loops!”);
understand = false;

The error message saying:

Oops, try again. It looks like you didn’t print the string to the console. Check your loop syntax!

HI the while condition should be true so this line

while( understand === false )

you should change false with true
it’s this line inside the while statemnt

understand = false;

which will stop the loop

1 Like

Thanks a lot… It worked…