20/30 Penguins, Properties, and the Prototype



i cant see what i am missing, ive compared it to others and they all seem the same as mine??

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();

var Emperor = new Emperor ("Aaron");



HI this line

var Emperor = new Emperor ("Aaron");

you object should be named emperor instaed of Emperor


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