It looks like you printed wrong number of items


#1

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

I think the code is OK, but I get "It looks like you printed wrong number of items"


for( var i = 0; i < 21; i++) {
     console.log(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");
    }
   
       
  
}


#2

the number should only be logged if its not a fizz, buzz or fizzbuzz number

and the number range shouldn't include zero, it should start at one


#4

Start the for loop from 1 not 0


#5

also needs a console.log at the end printing (i)


#6

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