Introduction to Objects I. 3. ...And the good! "Error"


#1

Hi, when i submit my code, I receive this error: "Oops, try again. You printed Fizz when you should have printed FizzBuzz". Please help me point out what is wrong. Thank you very much.

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

I figured it out. "FizzBuzz" was suppose to be the first one to be logged.