...And the good! 3/33 Need Help


#1

Hey guys.
I need help with my code, it looks like I am doing something wrong, but I can't find where is the error.


https://www.codecademy.com/courses/spencer-sandbox/0/3?curriculum_id=506324b3a7dffd00020bf661#


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


for(var i = 0; i <= 20; 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

This thread may help

I hope it helps!


#3

Control Flow problem on your last check,

check if the number is dvisible by 15 instead and your code should work. :slight_smile:


#4

Solved my problem, thanks guys !


#5

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