6/11: Syntax Error: Expected ";"


#1


https://www.codecademy.com/courses/javascript-beginner-en-ASGIv/1/2?curriculum_id=506324b3a7dffd00020bf661


I am getting a syntax error for an expected ";" but I'm not sure where it is suppose to be. I've tried a few different options.


var condition = true;

var soloLoop = function(){
  while(condition){
      console.log("Looped once!");
      var condition === false;
    }
  
};

soloLoop();


#2

Hi this line

var condition === false;

you should set condition(without the var before it) to false so you should use = instead of ===


to set something to a variable you use =
to compare two value (variable) you use ===


#3

Thanks, I actually just figured that out on my own and came to delete this before any saw :stuck_out_tongue_winking_eye:

I appreciate the help though!


#4

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