So here is the code to the problem:
understand = true;
console.log("I'm learning while loops!");
//Change the value of 'understand' here!
I changed understand to false as the instructions recommended and it passed the lesson the first time around. However, I'm having trouble understanding why it works the way that it does.
In the while(understand) part, why is understand assumed to be true? It doesn't say while(understand=1) or while(understand=true) so why doesn't it keep looping after understand=false in the curly brackets below? The way that I see it, at the end of the first loop, understand becomes false, then enters the loop again and launches understand a second time. Now, understand is false, but the condition doesn't keep it from being false, so why doesn't the loop continue?
If someone could clear this up for me, I would appreciate it. Thanks!