Functions recap: string won't show up in the console



I'm wondering why this doesn't work. Codeacademy says "way to go!", so it should be correct, but in the console is just:

"[Function: nameString]"

May someone please tell me why this is happening?

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



I see what you were doing and it makes sense but it wont work.
instead of these two lines you would need to give namestring a value when you call it like this



I see! Thank you for your response! Maybe Codeacademy should mark my code as false then...


possibly. the reason it still passed is because you still met the instructions requirements, but you were using a different method that didn't give the same result so you didn't actually log what you wanted to. I hope that worked for you though and that you enjoy the course! :slight_smile:


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