Question 2! while syntax


#1

I really do not understand whats wrong. everything i press is almost shuts down my browser? any advice?
the question is : Try it yourself—complete the while loop in the editor so it will print out "I'm learning while loops!". Do this by adding the condition between the parentheses—don't change line 5, or you could get an infinite loop!


#2

ok I got it! I typwed understand again


#3

Yes your using "unserstand" instead of understand. It's not only about the typo but also about the fact that this is a string whereas it should be the variable name. As you can read here:
http://www.sitepoint.com/javascript-truthy-falsy/
non-empty strings are treated as true when used in a condition so that's why this crates an infinite loop.


#4

Code your like this:
while(understand){
//code here
}