Marching Penguins


It runs successfully but prints nothing to the console....Cant figure out why it wont print to console.

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

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

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



The only thing i see,
is that you are using 3 parameter
in your Object class constructor =Penguin=

function Penguin(name,numLegs,sayName){ = name;
    this.numLegs = numLegs;

this should be

function Penguin(name,numLegs){ = name;
    this.numLegs = numLegs;

++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom