Functions Recap Error Message...Oops, try again


var nameString = function (name )

{ return “Hi, I am” + name; };


Error message: Oops, try again. Hmm, it looks like your nameString() function doesn’t return ‘Hi, I am Susie’ for the name Susie.

What am I doing wrong?


you need a space between am and Susie.


var nameString = function (name )
return “Hi, I am” + “”+ name



I get the same error message with the space. I took away the space between Susie and am because another person had an issue on this thread with this problem and they took away the space, but I do not understand how they resolved the problem as they were not clear on the thread.


have a look at the output

you are printing

Hi, I amSusie

but you have to print

Hi, I am Susie

Have a look at the instruction no.3 again.your returning statement doesn’t look quite right.


Yeah, I noticed that, but I could not figure out what I was doing wrong. I just went back through the lesson and noticed that you have to put a space between the quotes in “Hi, I am” + " " + name. I did not have a space between those quotes so that is why I did not have a space between “am” and “Susie”.


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