Please help me with this: Can I See Your References?


#1

var james = {
    job: "programmer",
    married: false,
    sayJob: function() {
        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();

where am i getting wrong?


#2

This line is incorrect, remember you are assigning something.
james.sayJob = "super programmer";


#3

^^ This confused me. I tried the one below and it worked

james.job = "super programmer";


#4

@bigdoods That's what I said in my post that the above code was incorrect