22/23 more options


#1

Can someone help, I can not see anything wrong with my code. I am getting a syntax error.

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);


23/33 More Options I'm so stuck
#2

This part is wrong.

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

You aren't supposed to have periods there. Try this instead

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

Everything else in your code is correct.


#3

Thanks, I was looking at it for ages and I didn't notice the periods.


#4

You're welcome. Happy coding!


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.