Is this a bug? Intro to Objects


#1



The error message makes no sense. I've checked my code at least a dozen times, and all it does is give me the weird error message listed below. If this is a bug, please fix it.

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


"Oops, try again. You printed Fizzbuzz when you should have printed Fizzbuzz."

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


#2

Shouldn't you print FizzBuzz? With a capital B?


#3

Yeah, haaahaha just found that out on another forum post. Thanks anyway! :slight_smile:


#4

also you have a lot of unnecessary semicolons. You don't need to put them after braces, since the interpreter already understands an end of code when it sees a curly brace. a debugger would give you so many warnings with those semicolons.