#11 Function Recap


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/3?curriculum_id=506324b3a7dffd00020bf661


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

My code passes the only problem that I am having is that when I hit submit it logs [Function]
and not Christian. Why is it that it passes and not correctly log my name?


#2

Well you're printing the function, isn't it reasonable that it says "Function" when you do?

Perhaps there's something other than the function itself that you'd like to print, how do you obtain that something?


#3

okay it worked when I did


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

the weird thing is that I thought I tried this and it gave me an error. Maybe I overlooked something. Thanks for the tip.