Syntax error


#1

I've been working on this problem for several minutes and i cant figure it out.

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

james.speak("great");

when i print it i get the error message saying SyntaxError: missing ) after argument list. Please Help!


#2

here's the lesson,
https://www.codecademy.com/courses/objects-ii/0/3?curriculum_id=506324b3a7dffd00020bf661#


#3

If you add code that is not asked for, expect the lesson to not accept your submission. Follow instructions and do only what is asked, for best results.

This is the error:

Missing a + before mood.


#4

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