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


#1

https://www.codecademy.com/courses/objects-ii/0/1?curriculum_id=506324b3a7dffd00020bf661#

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

#2

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


#3

Thanks, I cant believe I didn't see that


#4

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


#5

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


#6

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


#7

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.


#8

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