...And the good


#1

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

Error message says OOPS, try again. It looks like you didn't print out the right numbers - however I don't see any numbers printing out? I'm not sure what's wrong?

var count = function () {
  for (var i = 1; i <= 20; 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

Here:

You should be logging out "Fizz" rather.


#3

Thanks I just caught that but it's not making a difference in the error message.


#4

Also take out every component defining count function. Not necessary.

var count = function () {

}

#5

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