What am I doing wrong, with this Java Script?


Hello - I am new at writing Java Script.

I get this message with my code. ( See code below).
Oops, try again. Hmm, it looks like your nameString() function doesn't return 'Hi, I am Susie' for the name Susie.

Is there anyone that can tell me what am i doing wrong?

My code:

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


In your function you are supposed to use are return statement and not a console.log(),

should be,

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

And also you are instructed to use console.log when calling your function so instead of,



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