Penguins, Properties, and the Prototype


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

// create an "emperor" object and print the number of legs it has
Emperor.prototype= new Penguin();
var emperor= new Emperor("YAWWW")
console.log("Hi I have "+ emperor.numLegs + " " + "legs");

Error: Oops, try again. Make sure to log the number of legs emperor has!

What's wrong?



Code is good. You just need to print the number of legs emperor has.


This worked.Cant believe I have been blind to the instructions. Thanks man.