23. more options help


#1

https://www.codecademy.com/en/courses/spencer-sandbox/3/4?curriculum_id=506324b3a7dffd00020bf661

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


#2

sorry, i had species instead of age. i fixed it but same problem!

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


#3

The + at the end of your console.log statements mean the interpreter is looking for something to print at the end of each statement. Since there is nothing there an you just end the log it says that ) is an unexpected token because it was looking for something else.


#4

It's your last two lines; the + implies that there should be another variable afterwards, but instead you've closed console.log().


#5

ok thanks! i wasnt sure what that was for, but it was in the code so i just left it there. i deleted it and its all good now!
Thanks again!


#6

Thank you! I was having the same problem. Total brain fart. :slight_smile:


#7

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