4. Can I See Your Reference?


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>


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

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

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

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

//Oops, try again. It looks like your sayJob() method does not properly log ‘Hi, I work as a [job]’ to the console

Can anyone enlighten me, please?


#2

your output:

Hi, I work as aprogrammer
Hi, I work as asuper programmer

desired output:

Hi, I work as a programmer
Hi, I work as a super programmer

see the missing space in your output? after a and this.job


#3

It worked, thank you for the very quick response!


#4