# 11, why does my return have to say " Hi I am Susie"?


#1

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

console.log(nameString("Susie"));

Even though it doesn't say anywhere in the lesson that the return has to say "Hi, I am Susie" .. it insists that's what my return should say before I continue? SO I changed my name over to Susie, and now it's still saying my return doesn't say "Hi, my name is Susie" when that's exactly what my return is doing? lol


#2

Nevermind, problem solved.

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

instead of

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

for some reason the space between the "am and +" was bugging the editor out? hmm


#3

Space is a character like any other. If it's different from what's correct then it's different from what's correct.


#4

The space is just a character like any other. You wouldn't be surprised if this was rejected:

"Hi, I amm" + " " + name;

#6

Thanks for the insight!


#7

So if it's possible to have a space after the "am" just by having it before the quotation marks, like this:
"Hi, I am ", instead of "Hi, I am", why do you add an extra space by using + " " ? Why not just writing:

"Hi, I am " + name

instead of

"Hi, I am" + " " + name

? Seems super strange then..


#8

Honestly not sure what's going on at all here. I literally used the exact syntax as a guy on youtube who it worked for. Very frustrated!

var nameString = function(name) {

console.log("Hi, I am "+name+".");

};

nameString("Eric");


#9

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

};
console.log(nameString("Ajay"));


#10

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

};

console.log (name);
nameString("Ana");