3. literally speaking


#1

https://www.codecademy.com/courses/objects-ii/0/3?curriculum_id=506324b3a7dffd00020bf661#

What am I doing wrong? I keep getting the following error even though the page grades it as correct.

ReferenceError: Can't find variable: great

Thank you,

var james = {
    job: "programmer",
    married: false,
    speak: function(mood) {
        switch (mood) {
            case great: "Hello, I am feeling great";
            break;
            case just_okay: "Hello, I am feeling just okay";
            break;
        }
    }
};

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


#2

This should be a string, as well, the second case.


#3

Thank you, I also did not log it to the console.


#4

Good job. You will often find me addressing only one problem, even while there may be others. You kept at it, and found the other on your own. Kudos!


#5

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