16. help me please ! Its All In The Genes


#1

var Animal = function(name, numLegs) {
this.name = name;
this.numLegs = numLegs;

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

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


#2

@chrisgates,
You are using a double-space in your console.log()
Instead use

console.log("Hi my name is" + " " + this.name);