..And the good!


#1



3. And the good!


Error message: You printed Fizzbuzz when you should have printed Fizzbuzz.


var i = 1
for (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);
    }
};


#2

@rsdudick
try using

FizzBuzz


#3

Thanks. Can't believe I didn't see it.


#4

This is my code, it keep saying that it expected a function

for(var i=1; i <= 20; i++){

if((i%3)===0 && (i%5)===0){
console.log('FizzBuzz');
}else if((i%3)===0){
console.log('Fizz');
}else if((i%5)===0){
console.log('Buzz');
}
else{
console.log(i);

}
};