# 11, recap on function


#1


I think I am right, but it keep to give me opp..please help



This is my code:

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

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

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


Replace this line with your code.


#2

Try this

var nameString = function (name) {

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

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

Your code is correct actually....it was showing a error because of the extra space here

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

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

#3

Thank you, problem solved!


#5

thank you... i had the same problem.. an extra space was giving a error...


#6

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