Stuck with 11. level, stuck with an unusual problem


I just finished my code and submitted it but suddenly it popped "Hi, I am Tom" AND
"Hi, I am Susie" on the console. I read the instructions and there was nothing written about this Susie thing.

Oops, try again. Hmm, it looks like your nameString() function doesn't return 'Hi, I am Susie' for the name Susie.

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


Hello! It actually asks you to return "Hi, I am" + " " + name" inside of nameString, and it wants you to console.log(nameString("Tom"));
I think this will actually solve your problem. The reason that Susie appears is because that is codecademy's check. :slight_smile:


Its like this! took me a while to figure it out


this won't help your question, but might make coding a little bit easier. you can {return "Hi, I am " + name;} instead of {return "Hi, I am" + " " + name;} It is just putting the space in the string before the string you made just for the space. It saves a little bit of time so you don't have to make that extra string for the space. Doing a lot of these "shortcuts" will save lines of code to make your code easier to read, shorter, more convenient for people to find mistakes, and it will save a lot of time that you can be using to progress in your code by a lot. Hope you found this side tip helpful! :stuck_out_tongue:


Thank you soooooo much!!!!!


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