Functions Recap - don't know what I'm doing wrong?


#1


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


MY CODE:

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

nameString("John");

I'm just not sure what I'm doing wrong. The console calls the name but I still get the error:
"Oops, try again. It looks like you didn't print anything to the console! Did you remember to console.log() the result of passing your name to the nameString() function?"



#2

Running your code does not result in calling console.log
Read your code and consider the order that your code is executed.


#3

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