Literally speaking


#1


My code is correct but it's not passing. what could I be missing?
error: It looks like your speak method doesn't properly take in a single argument and out put the string.


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

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


#2

you are using one extra console.log statement. You don't need that. You are calling the function speak below two times passing two different parameters. So one console.log will do the task

Below is the full code

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

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

hope that helps


#3

thank you! I actually had that the first time...then decided to refresh and go back to that. Thanks again for responding


#4

glad to help :slight_smile:


#5

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