23. More Options


#1

Hi, do you guys know what is wrong with my code? It appears: "SyntaxError: Unexpected token var", here is my code:

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

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

#2

@cssrunner13664,

1

remove the code lines

var sally = 
var holden =

2

Move the code lines

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

behind the new Object definitions.....