Emperor Penguin Object (Needs Debug)


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

Emperor.prototype = new Penguin("George");
console.log(Emperor.numLegs);


#2

Yes. I made another one.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.