4/30 prints perfectly on the console, but still gives an error



So here's my code:

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

// james' first job

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

// james' second job

And it prints out:

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

But for some reason codecademy gives me the following error:

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

Can somebody please tell me what am I doing wrong?


Hi - check what you're logging to the console - you missed the space after "a" and it doesn't need a comma.



Thanks for the fast reply! Could you specify where it doesn't need the comma? I also get two spaces on the console if I write a space after "a".


In your sayJob method
console.log("Hi, I work as a", this.job);
should be
console.log("Hi, I work as a " + this.job);


Now it works. Thank you!