Can I See Your References?


#1


I succeeded in this chapter but my question is,
Why did they ask us to "// change james' job to "super programmer" here....." .......When all i could have just done is change james job parameter to "super programmer" (as i did in the job parameter)?.

And also what code should i use in line 14.? Because i didn't type in any code here yet i succeeded

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

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

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


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


#2

Actually you are the one who did it incorrectly, all you were supposed to do is change it indirectly like,

james.job = "super programmer"

after this comment,


#3

Oh..ok...Thanks :slight_smile:


#4

I'm just slow understanding oop and methods


#5

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