And the good


#1


https://www.codecademy.com/en/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 = 0; 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

Start this with value 1 to get 20 items in the print out.


#3

ok Thanks! That worked. I guess 0 starts at 0, and 1 starts at 1.


#4

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