Syntax error in 11. Review


#1

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

I keep getting an error message and not sure why. The error message is: SyntaxError: Unexpected token }


for(var i = 10; i <= 100; i=+10) {
        console.log(i);
    }

var condition = true;
while(condition) {
    console.log("Bingo!");
    condition = false;
}  
    
var b = false;
do {
    console.log("You are the best");

    
    } while (b);
}


#2

I don't think i =+ 10 would increase the value of i.

Your final curly brace isn't wrapping any code blocks up.


#3

Thank you! The i=+10 wasn't the main issue I was having. It was the curly brace. I would try and remove it but it would then crash. I just added an opening bracket with it and that fixed the issue! Thanks for the help!


#4

Good to see it work out :grin:


#5

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