Can I See Your References Problem


Hi, it's Sai! I'm really confused; I keep running this code and comparing it to others' code on the same exercise, but for this code, the error message is "Oops, try again. It looks like you did not change james.job to 'super programmer' on line 14." I'm flummoxed; I did, it's right there, but maybe I have some syntax error or something. Could any of you please help me? Also, if I have any other errors in my code that I didn't pick up, it would be really nice if you guys could point them out too, because I'm still a novice at JavaScript and it can get really confusing.

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

// james' first job

// change james' job to "super programmer" here

james.sayJob("super programmer");

// james' second job


sayJob() is a 'getter' function, not a 'setter'. Assign the new value directly to the james.job property.

james.job = ....


It worked! Thanks so much :slight_smile:


3 posts were split to a new topic: Why it isnt work?