1 / 30, Problem with an unexpected identifier?


#1

var james = {
// add properties to this object!
job : "programmer"
married : false

};

function Person(job, married) {
this.job = job;
this.married = married;
};

// create a "gabby" object using the Person constructor!
var gabby = new Person("student", true);

This is giving me an unexpected identifier error, however I really cannot see what is wrong with it. Please help!


#2

var james = {
 // add properties to this object!
 job: "programmer" //<---Missing a comma here.
 married: false
};

#3

Thanks very much for the help


#4

here is my code: var gabby = new Person("student", true);
about the first you need to add a comma "," after programmer.