8/11 syntax error: exected ';'


I've been stuck on this for/while loop for way too long and I can't seem to find any other posts with the same syntax error in regard to 8/11.


SyntaxError: Expected ';'

var george === true;

var clooney = function(){
    while(george === true){
        console.log("George Clooney is a pretty good actor!");
        george === false;


var count = function(){
    for(var i = 0; i < 5; i++){
        console.log("I can count to" + "" + i);


You're missing a semicolon


I added the ";" where you suggested and I still receive the same error. Thanks for the help though!


You have wrong numbers of = signs


Thank you that ended up fixing it, but why does it make a difference. I know that when you only have one = it's assigning and if you have == or === it sets it equal to. I also don't understand why the "George in the while statement doesn't have to be just =. I appreciate all the help you have given me!


When you're assigning a value to a variable you use =. You're saying to the coputer this variable now contains this value, but when you use === you're making a comparison, you're asking the computer if the variable contains a value that is equal to the other value. I hope my explenation is comprehensive enough.


Yes that makes a lot more sense, I appreciate all the help.


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