An Object Review (What did I do wrong?) (answered)


It says Unexpected Identifier, but I can't seem to find anything wrong

var james = {
   job: "programmer"
   married: false

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

var gabby = new Person("student", true);


The unexpected identifier is married above, since the comma is missing after "programmer".


Thanks, I cant believe I didn't see that


Hey there! Items in a list are separated by a comma *hint hint*.
Also write falsein your james var with a capital F.

And I'm late again ;_;


And wrong, again, as usual. Quit giving invalid advice.


I must have had a bit of a brainfart when I wrote that second line...
But as usual? After two small errors?


I have seen several of your responses that were iffy. Being in a hurry to build up answer credits is going to result in that. Slow down and spend more time reflecting over the OP's problem and hurdles. One well written and reviewed/tested response is worth a hundred glibly tossed in.


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