4/30 Passed but the error message: ReferenceError: job is not defined


#1

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

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

// change james' job to "super programmer" here
james.sayJob("super programmer");

// james' second job
james.sayJob("AI expert");


#2

The sayJob method takes no parameter. It refers to the instance variable, this.job internally. Be sure to change your variable in the method.

To set a value,

james.job = 'super programmer';  
james.sayJob();                 // logs super programmer

#3

solved it thanks mtf!!