What is wrong? Introduction to Objects II, point 3,


#1

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

Everything is ok? But I see Oops, try again. It looks like your speak method doesn't properly take in a single argument and output the correct string. So help me with this, please.


#2

This is how I solved it.

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

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

It is a bad a idea to give 'ddd' as argument to your function as 'ddd' means nothing to you. Try to give names that make sense.
However, I don't see a problem with your code. It should be working, only error I can see now is that you should put bigger part of the string inside your function.