Can I See Your References?


#1


Hi, i don't know what's wrong with my code, the error message on the screen is: "SyntaxError: missing ) after argument list"


var james = {
    job: "programmer",
    married: false,
    sayJob: function() {
        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

@ricardoc2,
Either you use

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

or you use

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

#3

ohhh it's because of the space!!! GRRRR xD

Thank you!


#4

@ricardoc2
AND
the missing + sign


#5

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