I typed the code below..but still showing result with error


#1

i typed the code below..but still showing result with error.
var nameString = function (name) {
return "Hi, I am "+" "+name;
};
nameString("riya");
console.log(nameString("riya"));


Functions Recap
#2

There are two spaces in the resulting message between am and the name, you just need one:

return "Hi, I am " + name;

#3

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