My Code isn't printing logging "Buzz" for 5, 10, or 20


#1



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

Oops, try again. It looks like you printed out the wrong number of items.


for (var i =1 ; i < 21 ; i++) {
    if (i%5===0) {
        if (i%3===0) {
            console.log("FizzBuzz");
        } 
    }
        else if (i%5===0) {
            console.log("Buzz");
            
            } 
           else if (i%3 != 0) {
               console.log(i);
           }
           else {
            console.log("Fizz");   
           }


#2

matter of fact its not even logging the number at all. it skips over anything that should be logged as "Buzz"


#3

if this line is true:

if (i%5===0)

the else if and else won't get a execute. Make sense if you think about it:
if true, execute me. Otherwise (else if) execute me. Else if only gets execute if the if or else if before evaluates to true. You might want to redesign your program.


#5

thank you, didnt catch that at first