Function Recap Console.log help


#1



Hey I am having trouble figuring out what the instructions is really telling me what to do. Where do I put the console.log? Am i calling the function correctly?

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


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?


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


#2

Hi first this line

console.log(nameString);

should be outside the function nameString You could also remove it from all your code you don't need it then this line

nameString("Morgan");

put it inside a console.log()


#3

Thank you so much I figured it out


#4

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