I need some help with 1 please


#1



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


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


#2

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

#3

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


#4

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

#5

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


#6

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)

#8

This topic is inactive.