28/30 : unidentified error


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

var myDog = new Dog("dachshund");


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


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


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


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