Stuck on Lesson 11


#1

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


I keep getting the message "Oops, try again. There was a problem with your syntax." I've looked at multiple topics on the forum that were similar and changed my code many times but I'm still getting this error message. What am I doing wrong?


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

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


#2

Remove the the quote mark after name in your return statement.


#3

I don't know why the lesson tells you to put it, but the + " " between "Hi, I am " and name is useless, and will throw an error. Just add a space at the end of "Hi, I am".


#4

Thank you! Such a dumb mistake....needed another pair of eyes :slight_smile:


#5

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