This forum is now read-only. Please use our new forums at discuss.codecademy.com.

476 points
5542b941e39efe5c3a000547_470864101
Submitted by
pyCoder96406
almost 4 years ago

Need help please

Not only show me your code but explain to me

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

};


2 votes

permalink

You've almost got it...

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

In your original code, you missed the { } brackets after creating your function. You want to place console.log outside of your function.

239 points
50b94887653134aeaa000e18_292426196
Submitted by
lukebot
almost 4 years ago

1 Comment

5542b941e39efe5c3a000547_470864101 pyCoder96406 over 3 years ago

yeah thanks.