Yes, this is Dog


It's printing correctly, but giving me an error. I've also refreshed the browser.

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

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

var myDog = new Dog("dachshund");


make sure the output string is exactly as expected. Even a full stop will change it


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