28. Hello?



I wrote the code you see below, my code passes the test but doesn't print anything.
Have I done something wrong?

Thank you :slight_smile:

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


it seems fine,

maybe it is a bug.


Ty once again enigmatike


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