#3 .13 Introduction to Objects


#1


Hey I am having trouble with my code :cry: It is probably something stupid, but I can't seem to find it.


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


ReferenceError: Fizz is not defined


1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
        
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

The above should not be part of your code. Remove or comment it.

/*
1
2
...
*/

#3

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