A syntax mystake


<var understand = true;

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

Replace this line with your code.


Why for the name of the God it says 'Syntax error unexpected token )?


Your while condition needs an overhaul. In your 1st line of code, you assign understand a boolean value, true. Then, you place 2 different comparisons for understand in the while condition. You only need one. It should just evaluate whether or not understand is true or false. Outside your condition, there is a semicolon. Remove it.

Just out of curiosity, why have < and > at the start and end of your code?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.