23/33. More Options


#1

I am very confused!! There is a syntax error saying "Unexpected Token )" Im not sure on what im doing wrong...
Here is my code

function Person(name,age) {
this.name = name;
this.age = age;
this.species = "Homo Sapiens";
}

var sally = new Person("Sally Bowles", 39);
var holden = new Person("Holden Caulfield", 16);

console.log("sally's species is " + sally.species + " and she is " + );
console.log("holden's species is " + holden.species + " and he is " + );

I don't understand on what i'm supposed to be doing. Someone HELP PLEASE!!!!!


#2

console.log("sally's species is " + sally.species + " and she is " + ); // Your problem is that final +, if you want to reference her age you should use sally.age
console.log("holden's species is " + holden.species + " and he is " + ); // Again, your problem is that final +

#3

You have to make sure you checked for typos and use "new" when creating the new objects:

`var Person = function(name,age) {
this.name = name;
this.age = age;
this.species = "Homo Sapiens";
return this;
}

var sally = new Person("Sally Bowles", 39);
var holden = new Person("Holden Caulfield", 16);
console.log("Sally's name is " + sally.name + " and she is " + sally.age + " years young.");
console.log("Holden's name is " + holden.name + " and he is " + holden.age + " years young.");`