I want a help to know if my code is right or no.if it gives the output,why the error apear?.the lesson title is can I see your refrences


#1

var james = {
job: "programmer",
married: false,
sayJob: function() {
// complete this method
console.log("Hi, I work as a"+this.job);
}
};

// james' first job
james.sayJob();

// change james' job to "super programmer" here
var james = {
secondJob: "super programmer",
married: false,
sayJob: function() {
// complete this method
console.log("Hi, I work as a"+this.secondJob);
}
};

// james' second job
james.sayJob();


#2

At first - you have to use IF in your method for using "JOB" defined in Object.

In line 14 - you should define parametr JOB so with "=" mark - don't copy the whole object.


#3

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