It looks like your speak method doesn't properly take in a single argument and output the correct string


#1


Whats wrong with my code?

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

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


#2

Hey @netplayer32439,
you have a missing semicolon ; after the closing paranthese ) in the line where you console.log() the output.


Hope I could help you :slight_smile:
If you got further questions, feel free to get in touch with me :smiley:
Make sure to mark my post as solution, so others which face the same
issue will be able to take it as a reference :wink:
Greez, 0xB4DC0DED


#3

I do not think the semicolon cause this problem, after I added the semicolon, it still warns the error.


#4

Ahh, I see another mistake:

use
console.log("Hello, I am feeling " + mood);
instead of
console.log('"Hello, I am feeling ' + mood + '"');

This should fix the problem :slight_smile:


#5

:grinning:you are right, the ' " ' and " ' " are disater :rage: