It's All in the Genes


I've searched and searched and I cannot figure out why I'm getting the error "SyntaxError: Unexpected token {"
Can anyone help?

// create your Animal class here
function Animal(name, numLegs) { = name;
    this.numLegs = numLegs;

// create the sayName method for Animal
    console.log("Hi my name is " +;

// provided code to test above constructor and method
var penguin = new Animal("Captain Cook", 2);


Ah finally figured it out, was missing the "function" after "Animal.prototype.sayName".

Never mind.