I dont understand


#1


while(understand = false )
{
	console.log("I'm learning while loops!");
	understand = false;
}



#2

var understand = true;

while(understand = false )
{
console.log("I'm learning while loops!");
understand = false;
}


#3

Different value but same problem :slight_smile:


#4

it still doesnt work

var understand = true;

while(understand === false )
{
console.log("I'm learning while loops!");
understand = false;
}


#5

What is the error message?


#6

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

var understand = true;

while(understand === false )
{
console.log("I'm learning while loops!");
understand = false;
}


#7

3rd line, you write "while (understand === false)"
understand is not false, (you defined it as a truth in 1st line) so it won't work.


#8

so what should i do?


#9

Your condition must be true to run the loop and false to stop it:

var understand = true;
while(understand ===  false )

here the condition is false because true === false is incorrect.