My code isn't working and I've tried many different methods


#1


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


It looks like you printed out the wrong number of items


var counting = function(){
    for(var i = 1; i < 21; 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);
        }
    }
}.


#2

a function only executes if you call it, call the function or remove the function.


#3

You have a stray period at the end of your code. Have you tried calling your counting function?

(@stetim94 you are like The Flash :zap: :smile:)


#4

Thanks I took out the function and it finally worked. I'm not sure why I put that in there thanks so much.


#5