Interesting error message


#1

...And the good!

<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

Well then by that error message I would assume you need "FizzBuzz" instead of Fizzbuzz with the capitol B being the big difference. I believe this is so since Fizz and Buzz are supposed to make FizzBuzz so I would assume that is why the B is capitolized if this is the case


#3

:slight_smile:Thank you. I did'nt see that difference


#4

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