Stuck with code syntax


#1

Hello, I want to know what is wrong with this syntax, eventhough the output seems to be correct but i am not able to proceed further. It is from Object 2 of js and the topic is Literally Speaking

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

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

#2

weird, try using + to join the string, don't forget the space between feeling and mood


#3

thank you, it worked with + operator!


#4

i would argue it should work with , as well.

If i have time, i will look into it, you got the code right so currently i was just trying to be practical


#5

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