Can't proceeed to next step


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) { = name;
    this.numLegs = 2;

// create your Emperor class here and make it inherit from Penguin
function Emperor(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 );


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!


you are my superman :grin: