Marching Penguins


Hi Guys,
I really didnt get this clearly. I created Penguin Constructer and then sayhello function. Please help me as I am really struggling on this.

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

// create a Penguin constructor here
var Penguin = new Animal(){

// create a sayName method for Penguins here

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


The idea here is to follow the example shown in the Animal constructor.

function _______(name) { = name;
    numLegs = 2;

Again, the idea is to follow the example above for Animal.prototype...

______.prototype._______ = function() {



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