16. It's all in the genes


#1

Why does this code pass but not print anything to the console?

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

Animal.prototype.sayName = function() {
console.log("Hi my name is " + this.name)
};

var penguin = new Animal("Captain Cook", 2);
penguin.sayName();


#2

Scratch that, just needed a refresh