What is wrong with sayJob()?


#1

Hi, all

I've stuck with sayJob() method. I implemented a method like:

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

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

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

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

but I've got error:
Oops, try again. It looks like your sayJob() method does not properly log 'Hi, I work as a [job]' to the console

What is wrong?


#2

Try this instead?

console.log("Hi, I work as a "+this.job);