17. Marching Penguins - Help please


#1

hi. i just view this lesson in many other topics, but i don't understand where is my wrong.

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

// create a Penguin constructor here
function Penguin(name,numLegs) {
this.name = name;
this.numLegs = numLegs;
}
// create a sayName method for Penguins here
Peguin.prototype.sayName = function() {
console.log("Hi my name is " + this.name);
};
// our test code
var theCaptain = new Penguin("Captain Cook", 2);
theCaptain.sayName();

Error:"Oops, try again. Make sure to properly define the Penguin.prototype.sayName method!"

thank you advanced.


#2

@salatiel1987,

Have a close look at

Peguin


#3

leonhard.wettengmx.n thank you.
I change my arguments, but not works.

// create a Penguin constructor here
function Penguin(name,numLegs) {
this.name = name;
this.numLegs = numLegs;
}
// create a sayName method for Penguins here
Peguin.prototype.sayName = function() {
console.log("Hi my name is " + this.name);
};
// our test code
var theCaptain = new Penguin("Captain Cook", 2);
theCaptain.sayName();


#4

@salatiel1987
You still have the Error


#5

Thanks
leonhard.wettengmx.n