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


Whats wrong with my code?

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

james.speak("just okay");


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


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


Ahh, I see another mistake:

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

This should fix the problem :slight_smile:


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