1. object review


#1

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

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

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

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

ReferenceError: sayJob is not defined <--- why?? :confused:


1.object review
#2

Because why is your function sayJob() making itself equal to sayJob. Whats going on in there?!


#3

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