Stuck on number 11 of Function


#1


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


It says that for the name Bobby it wont print out "Hi, I am Bobby"
This is because I dont have a variable which gets the name, or something similar to that.
But how can I get that? How do I define the name, and get past this level.

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


#2

So here in your function you need to have name.

You can just put name in the () but that will just give you Hi, I am so put whatever name you were choosing to put in their in place of name.


#3

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