...And the good! Error


#1


3... And the good!


Oops, try again. You printed Fizz when you should have printed FizzBuzz


Replace this line with your code. 
for (var i = 1; i < 21; i++) {
    if (i %  3 === 0) {
        console.log("Fizz");
    } else if (i % 5 === 0) {
        console.log("Buzz");
    } else if ((i % 3 === 0) && (i % 5 === 0)) {
        console.log("FizzBuzz");
    } else {
        console.log(i);
    }
}


#2

when doing this assignment you want FizzBuzz to be before Fizz and Buzz seperately


#3

and I don't think you need the extra parenthesis in the last if else statement


#4

It's valid condition. But you're right, there is no necessary in parenthesis inside the if( ).


#5

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