20/30 What's wrong in this code?


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(); // notice no arguments

var emperor = new Penguin("penpen");


What's the bad of this? The results I'm getting 2.




It went well in the code.
Thank you very much. :smile:


Oh, I get my problem now. XD I kept misspelling emperor! So that's why I always ended up with right results but it was saying I didn't properly define 'Emperor'! :laughing: