11. Review unexpected token ; and expected opening {



SyntaxError: Unexpected token ';'. Expected an opening '{' at the start of a function body.

  for (var i=1; i<11; i++){
   var misha = function ();
while (misha === true) {
    misha = false;
    var loopCondition = false;
        console.log("phrase" + loopCondition +"!");


Check my comment, that's the reason for the error message. I don't recommend using misha as the name of your function and the boolean being checked in the while loop condition of the same function. Things get messy. Also, don't forget to close the function.


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