20. Penguins, Properties, and the Prototype


#1

I cannot find the mistake in my syntax. Here is my code:
function Penguin(name, numLegs) {
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)

Error I receive is "Oops, try again. Make sure to log the number of legs emperor has!"


#2

emperor takes in one argument which is name but you provided none