3. the code works but it won't let me pass


#1


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


It seems to work perfectly, but it keeps giving me this error. What can I do?

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


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

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


#2

HI this line

console.log("Hello, I am feeling", mood);

instead of ,

,

you should put +

AND

it better that you add a space after feeling like that

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

so that it will print

Hello, I am feeling great
Hello, I am feeling just okay

instead of

Hello, I am feelinggreat
Hello, I am feelingjust okay
`


#3

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