28/30 : unidentified error


#1

Hello, everybody, I can't identify my error in this exercice :

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

// add the sayHello method to the Dog class
// so all dogs now can say hello
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

What is the actual error message you get? Your code looks (and works) fine on my side.


#3

"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"

I tried to reset the code, but it does not work either, it's really weird...


#4

If it really expects Hello this is a, you should remove your comma between Hello and this :smiley: Weird formatting, I guess.


#5

Ah ah, it was "just" the comma... !
Thank you a lot ! :sparkles: