Printing numLegs of emperor


Penguins, Properties, and the Prototype

Oops, try again. Make sure to log the number of legs emperor has!

Replace this line with your code. 
function Penguin(name) { = name;
    this.numLegs = 2;

// create your Emperor class here and make it inherit from Penguin
function Emperor(name) { = name;
// create an "emperor" object and print the number of legs it has
Emperor.prototype = new Penguin();

var emperor = new Emperor("eee");



Your code is Ok.

Maybe you have to Refresh you Browser

Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use