17. Marching Penguin| Please help me


#1

function Animal(name, numLegs) {
this.name = name;
this.numLegs = numLegs;
}
Animal.prototype.sayName = function() {
console.log("Hi my name is " + this.name);
};

// create a Penguin constructor here
function Penguin(name, numLegs) {
this.name = name;
this.numLegs = numLegs;
}

// create a sayName method for Penguins here
Penguin.prototype.sayName = function() {
console.log(" Hi my name is " + this.name);
};

// our test code
var theCaptain = new Penguin("Captain Cook", 2);
theCaptain.sayName();

Can someone help me with this. I can't find the mistake in code.

code returns:
Oops, try again. It looks like your Penguin.prototype.sayName method doesn't return 'Hi my name is [name]' where [name] is the penguin's name


#2

Hi inside here

console.log(" Hi my name is " + this.name);

Remove the space before Hi


#3

O what a stupid mistake. Thanks!!