Functions recap #11


The error message reads, "Oops, try again. Your code doesn't look quite right. Click "Stuck? Get a hint!" if you need help!" I really don't understand what I did wrong. I even put it into a syntax checker and it said its all valid code. Please Help!

var nameString = function (name) {
	return "Hi, I am" + " " + (name);



Hi this part


you should put john as a string with the " " around it


Don't give any space between "Hi, I am" and "+".

var nameString = function (name) {
return "Hi, I am"+" "+name;

if any error,then copy & paste this code.
all will be ok.


what do I do wrong here?


Hi what error do you get?


'I am Susie' is printed twice. Which is even beyond my understanding since I printed 'robert' and it does not say 'susie' anywhere.


try to change the console.log with the return statement


Awesome! That does the trick! Thanks a lot.

I do not understand the differency really? console.log is supposed to print my 'output' but so is the return statement right? What is the difference here?


you could read the diference in that topic


after nameString("robert") give a semicolon.->->->nameString("robert");

Thank you.


It says "Way to go" but it doesn't look like it is.

What is wrong here?


Hi just put the


inside a console.log()
and remove that



Thanks, again :wink:


What is wrong in this code? Please help.


HI your string shoudl be

return "Hi, I am" + " " + name;


But why does it print out [Function]? Isn't what you typed and what he typed the same. Shouldn't it produce the same result?


HI when you get function its because your are printing the name of the function

for example

var hello = function() {

if you print it like that



instead of call the function you are printing the function name because it missing the ()... then if you that


And about the string

look welll his is like that

return "Hi,I am" + " " + name;

and the one I posted ...

return "Hi, I am" + " " + name;

Do you see the difference?


Thanks! that helped.


Hi guys!

Can someone point what's happening?
Seriously, why this FS is not working :blush:?

I'm trying to not hate JavaScript. Please help me :)!

Thanks a lot!


Hi try to refresh the code..