This totally worked but I guess it's not what they're looking for


#1


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


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


#2

As long as your code is passed by the SCT it means it's good. :slight_smile:


#3

Oh apparently if the number is divisible by 3 or 5, they don't want it to appear, just the word. Easy else statement change.


#4

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