What's the corect version for Lesson 11 Waypoint?


#1

This is my version and I don't like it at all:

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

#2

Pretty close the function is ok the problem is this:

nameString("Mihai");

correct fucntion call but the returned value is never again used.

console.log(nameString);

printing the function name only tells your (This is a) [Function]. So better console.log the function call and not the function name:

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