Help! I don't understand


#1

var understand = true;

while(understand === false){
console.log("I'm learning while loops!");
understand = false;
}
help! I don't understand! it says I didn't log the string to the console... do I have to? what does it mean? the string in the console was already printed for me!


#2

try
while(understand===0)


#3

Herr try this instead

var understand = true;

while(understand){ //we have already defined understand to be true
    console.log("I'm learning while loops!");
    understand = false; // termaination statement
}

remember this is how the while loop works

while(some_condition_is_true){
    //execute some statements
    //add termination statement
}

an example below

var distance_to_school = 30;
var keep_walking = 0;

while(keep_walking< distance_to_school){
    console.log("Walking to school. "+ (distance_to_school- keep_walking) +"km more to go");
    keep_walking+=3;
}