Unexpected token ")"


#1

this code should work

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

why is there an unexcpected token?


#3

To print the age, leave the + and type sally.age


#4

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