20/30 What am I messing up?


I don't really know what's wrong with my code but I suspect it has something to do with trying to link Emperor
with emperor. So can someone tell me what I'm messing up?

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

var Emperor = function(name) {
this.name = name;

Emperor.prototype = new Penguin();

var emperor = new Penguin();

console.log("Hi I have " + emperor.numlegs + " legs.");


Hi dbfulwilergmail_com, it looks like you need to capitalize the L in .numlegs. That should fix it.


"Emperor" and "emperor" won't interfere with each other, as long as you use the right one.