An Objective Review


#1


It's my code. It's showing "Oops, try again. There was a problem with your syntax." Can you help me please?


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 = { 
    job = "student", 
    married = true
}


#2

Yeah, now it's working...

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)

#3

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