3/30 Unexpected token error


#1


SyntaxError: Unexpected token


var james = {
    job: "programmer",
    married: false,
    speak: function(mood) 
    {
        console.log("Hello, I am feeling " + mood);
    };
};

james.speak("great");
james.speak("just okay");


#2

speak: function(mood) {
   console.log("Hello, I am feeling " + mood);
}; // remove ;

#3

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