23. More Optoins



I'm using the following code on the '23. More options' exercise, but is saying 'unexpected token'. I can't see where there is an unexpected token. I even look at other solutions in the forum which match what i'm doing and I've put the information below in my console in a web brower and it works. Very confused.

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

var sally = new Person ("Sally Holden", 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 );


I refreshed the page in my browser and the above code worked. Don't know quite what was going on there.


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