Help me with the older JS course?


#1

https://www.codecademy.com/en/courses/fizzbuzz/2/5?curriculum_id=4f4b35445cb288000300000c#

// see the Hint button if you're not sure how to start
var number = 666;
for (i=1; i<number; 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");
    } else {
        console.log(i)
    }
}

The error message says "Oops, try again. False".


#2

instructions:
Modify your FizzBuzz program so that it runs for 1 to 100.

yours run till 665 not 100


#3

The same message appears when I leave out the variable and if I change the program to run through 100.


#4

with your code:

seems to be working fine?

make sure to change number to 101, since you use < in your loop condition, so the number itself is not included. you can make number 100, but then use <= in your condition


#5

The instructions mention going beyond 100. I hoped 666 would have been enough.


#6

no, the instructions state:
Modify your FizzBuzz program so that it runs for 1 to 100

where did you see the more then 100? Yes, you can create the variable, but not for a value more then 100 (not in the exercise), that is for impressing your friends outside the exercise


#7

"Modify your FizzBuzz program so that it runs for 1 to 100.

If you want to be really cool, replace 100 with a variable that you declare and set at the beginning of your program so you can easily impress your friends with FizzBuzz solutions for any number of your choosing"

I just wanted to be really cool :cry: