23/33


#1

I checked and rechecked and don't see where the mistake is, can someone help me, please ?
The error I get is " SyntaxError: Unexpected token )"

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 " + sally.age + );
console.log("holden's species is " + holden.species + " and he is " + holden.age +);


#2

You have an extra + at the end of your console.log


#3

You're trying to add too much in the last two console.log statements.

console.log("sally's species is " + sally.species + " and she is " + sally.age + );
                                                                               ^

console.log("holden's species is " + holden.species + " and he is " + holden.age +);
                                                                                 ^

Essentially, the console is thinking you're trying to add the " ) " closing parenthesis. Try getting rid of those " + " and see if that helps!


#4

With this I still have the same error :confused:

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 + );
console.log("holden's species is " + holden.species + );


#5

Ok I got it. It was the + at the end ! Thanks guys. Correct one is :
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 );
console.log("holden's species is " + holden.species );


#6

You didn't include Sally's and Holden's age in the console.log.