Literally Speaking


#1


I`m stuck at Introduction to Objects ll 3. Literally Speaking


When I run the code it gives me this: Oops, try again. It looks like your speak method doesn't properly take in a single argument and output the correct string. , However, it logs what I want it to log on the console.


Replace this line with your code. 

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

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


#2

the string logged needs to be an exact match, feeling is missing from your string


#3

Thats not the problem, gives me the same thing


#4

can i see an updated version of your code? It is the problem, i tried it with your code


#5

var james = {
job: "programmer",
married: false,
speak: function( mood) {

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

};

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


#6

i like what you did, but feeling should have been added here:

console.log("Hello, I am" // add feeling here

the exercise verifies that the james.speak("great"); and ames.speak("just okay");` function calls give the correct output


#7

Like this?
var james = {
job: "programmer",
married: false,
speak: function( mood) {

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

};

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

//This still doesn`t work


#8

don't include the space in the function calls!!! i told you, the exercise verifies this:

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

is correct, include the space after feeling


#9

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