3. ...And the good!


#1

Here is my code:

for (var i =1; i <= 20; i ++){
if(i%3){
console.log("Fizz");
}

if(i % 5){
  console.log("Buzz");    
 }

if(i % 3 && i % 5){
    console.log("FizzBuzz");
    }
else{
    console.log(i);
    }  

};

Here is the error message: Oops, try again. It looks like you printed out the wrong number of items.

can anyone help please?


#2

Try to compare the results with 0 like this:

if(i % 3 === 0)