Exercise number 20


When I run the following code I get a message as Oops, try again. It looks like you didn't set Emperor to inherit from Penguin! on the console I get a message as ReferenceError: Pengiun is not defined

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

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



Have a close look at