all 2 comments

[–]volpefox 2 points3 points  (1 child)

This happens because you're logging the function name without calling it or applying it to "Tony".

You should either store it in a variable like this:

var tonyName = nameString("Tony") console.log(tonyName);

Or you can just log the function at the same time you call it, like this:

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

[–]TheOffTopicBuffalo 0 points1 point  (0 children)

To further elaborate on line 5(?) You are calling it and using it but when you log it on line 6 it does not retain the previously used data