My code is wrong?

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

```

var nameString = function (name) {
return (“Hi, I am” + " " + name);
nameString(“Jay”)
console.log(return)

};

<do not remove the three backticks above>

This logic is flawed. [quote=“cloudjumper31651, post:1, topic:67358”]
console.log(return)
[/quote]

what do you expect this to do? return is no variable. Get rid of this line completely.
I can see where you’re going with this, but you’re doing it wrong. [quote=“cloudjumper31651, post:1, topic:67358”]
return (“Hi, I am” + " " + name);
[/quote]

This line is perfect.

This line is good too, but you need to move it outside of a function. You are creating recursion, but you don’t want to. Just make sure to get it outside of the function nameString.
I hope this helps! :slight_smile:

Poker Online

Poker

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