3. ...And the good!


#1

What's wrong with my code here?
for (var i = 1; i < 21; i++){
if ((i % 3 === 0) && (i % 5 === 0)){
console.log("FizzBuzz");
} else if {
(i % 5 === 0)
console.log("Buzz");
} else if {
(i % 3 === 0)
console.log("Fizz")
} else {
console.log(i);
}
};

It tells me SyntaxError: Unexpected token {, but it seems like all my curly brackets go to the right place. What's up?


#2

if (condition) { statements }

You have three if-statements. Start comparing.


#3

I'm not sure what you mean.


#4

Your if-statements do not all match that pattern.


#5

Ah, I see! Thank you.