Can i see your refference


#1

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

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

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

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

anyone have any ideas whats wrong? ;/


#2

We do not pass a value to the the method. It looks internally at the instance variable. Use a direct assignment...

james.job = ...

This will replace the original string with your new one.


#3

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