Can't proceeed to next step


#1



I don't know whats wrong with my code, it shows the numLegs and still can't proceed to next step

Penguins, Properties, and the Prototype


this always showed up -> Make sure to properly define the Emperor constructor!


function Penguin(name) {
    this.name = name;
    this.numLegs = 2;
}

// create your Emperor class here and make it inherit from Penguin
function Emperor(name) {
    this.name = name;
}

Emperor.prototype = new Penguin();

// create an "emperor" object and print the number of legs it has

var Emperor = new Emperor();

console.log( Emperor.numLegs );


#2

Your code Looks fine but

Emperor is not emperor! Last the instruction want from you :slight_smile:

Create a new emperor object that is an instance of the Emperor class with any name you'd like. Then use console.log to print the number of legs emperor has—this should have been inherited from Penguin!


#3

you are my superman :grin: