Hello, yes this is a dog


#1


https://www.codecademy.com/courses/objects-ii/5/2?curriculum_id=506324b3a7dffd00020bf661#


Im not sure what is wrong, it says this: (Oops, try again. It appears that your sayHello method doesn't properly log to the console 'Hello this is a [breed] dog' where [breed] is the breed of the Dog)


function Dog (breed) {
    this.breed = breed;
};

Dog.prototype.sayHello = function() {
    
    console.log("Hello this is a " + this.breed + "dog")
    
    }

var yourDog = new Dog("golden retriever " );
yourDog.sayHello();

var myDog = new Dog("dachshund ");
myDog.sayHello();


#2

The trailing spaces may be messing with the SCT. Remove the spaces from your arguments, and add one to " dog".


#3

I tried to do that, but I got the same message. Should I just skip it or is there anything else I can do?


#4

I just found spaces after yourDog and myDog, thanks for your help!


#6

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