Penguins, Properties, and the Prototype


I keep getting the following error: Oops, try again. Make sure to properly define the Emperor constructor!

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

// create your Emperor class here and make it inherit from Penguin
function Emporer(name) { = name;

Emporer.prototype = new Penguin();

// create an "emperor" object and print the number of legs it has
var emporer = new Emporer("Jason");


Have you tried a refresh Browser

++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser


Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


I have. I tried doing that twice without success.


OMFG I spelled Emperor as Emporer. Wasting 30 minutes of my life.


yep about 30 min for exact same spelling error too...


var emperor = new Emperor("jason");

emperor.numLeg = function() {

try this it worked for me


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