4. can i see your reference


#1

  1. can i see your reference

    My code passes, but nothing prints out though. was wondering why?


var james = {
    job: "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.job = "super programmer";    

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


#2

It does print here: Introduction to Objects II

Or what would you like printed?


#3

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

}

};

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

// change james' job to "super programmer" here
james.sayJob("super programmer");

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


#4

it works, I don't know why it takes only this version.


#5

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