Error on Penguins, Properties, and the Prototype exercise!


#1

This is how my code looks like:

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 Penguin();
// create an "emperor" object and print the number of legs it has
var emperor = new Emperor("Nugget");
console.log(emperor.numLegs);

and I'm getting SyntaxError: Unexpected token }

I can't seem to find my Error !! heeeeeeelllppp !!!

NEVER MIND I GOT IT !!! :smile:


#2
Have a close look at

function Emperor(name}{