Not getting any output only job is undefined


#1

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

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

// change james' job to "super programmer" here
james.job="super programmer";

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

not getting any output only job is undefined.

why? helpme out


Can I See Your References?
#2

There should be no parameter.

sayJob: function () {

}

this.job is already defined. job is not.

    sayJob = function () {
        console.log("Hi, I work as a " + this.job);
    }

this inside the method refers to the execution context, namely the owner object, james. You'll cover this in greater detail as you progress.

The rest of your code looks correct, so do the fixes and let us know how you make out.