I've passed but my code seems to be wrong... 4/30


This is what I've typed:

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

// james' first job

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

// james' second job

Here is what the interpreter said:

ReferenceError: newJob is not defined




As you use newJob, the interpreter is looking for a variable newJob
which you have NOT defined.

So either use a string Value
prior to defining the james object define a newJob variable


Further on in your code your are referring to this.job
but you have to know that you are actually referring to the windows object...
and NOT the james object

google search
== the Book ==
javascript [your question] site:developer.mozilla.org

== discussions / opinions ==
javascript this explained site:stackoverflow.com
= http://stackoverflow.com/questions/3127429/how-does-the-this-keyword-work
== guidance ==