I need some help with 1 please

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/objects-ii/0/1?curriculum_id=506324b3a7dffd00020bf661

<In what way does your code behave incorrectly? Include ALL error messages.>
Hi thx for helping it says:
Oops, try again. Make sure james has a job property with ‘programmer’ as the value
Whats wrong here? And if you can tell me if there are any other mistakes because im pretty sure there is I just not sure where.

```

var james = {
// add properties to this object!

};

function Person(job, married) {
this.job = “programer”;
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);

<do not remove the three backticks above>

HI they aske you…

Finish the james object

var james = {
    // add properties to this object!
    
};

by adding properties to it. His job should be “programmer” and should have a married property set to false.
so you shouldn’t change that

unction Person(job, married) {
    this.job = job;
    this.married = married;
}
1 Like

Ok I found out I misspelled programmer and it still say I haven’t set his job to programmer so whats wrong here?
var james = {
// add properties to this object!

};

function Person(job, married) {
this.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 james object

var james = {
// add properties to this object!

};

its the one you should add propriety… then remove that

function Person(job, married) {
    this.job = "programmer";
    married = false
};
1 Like

Now it is saying there is something wrong with my syntax
var james = {
// add properties to this object!
function Person(job, married) {
this.job = job;
this.married = married;
};

function Person(job, married) {
this.job = “programmer”;
married = false

};

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

you begin with that code

var james = {
    // add properties to this object!
    
    
};

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

// create a "gabby" object using the Person constructor!

then then they aske you…

Finish the james object by adding properties to it. His job should be “programmer” and should have a married property set to false.


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

then
Create a new gabby object using the Person constructor. She should have a job of “student” and her married property should be true.
and YOu did it

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

so you code should be like that

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)
2 Likes

This topic is inactive.