20/ 30 Please help me out!


#1

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();
// create an "emperor" object and print the number of legs it has

var emperor = new Emperor("Charles");
console.log(emperor.numLegs);

what's the problem??


#2

@arnab20,

What kind of message are you receiving....


#3

your code worked for me. Try refreshing your browser!