Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Using String Methods

Blake Abbott
Blake Abbott
1,460 Points

Bummer! The `userName` variable is "23188xtrSmith" not "23188XTR#SMITH".

Where is this # sign comiing from ?

var id = "23188xtr";
var lastName = "Smith";

var userName = id + lastName;
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="app.js"></script>

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there! I think you're working on Step One of the challenge and yes, the Bummer! message for you is confusing because it's referencing something you won't see until Step Two. However, you are not following the instructions of the challenge. The variable userName should contain the uppercased version of id for Step One. Your userName contains id + lastName. Then you take userName and uppercase it. But that uppercased version is not stored back into userName. In fact, it's not stored anywhere at all or even displayed.

Review the requirements for step one: assign the uppercased version of id to the variable userName.

Hope this helps, but let me know if you're still stuck! :sparkles:

edited for additional note

The reason I suspect you are working on Step One is because if I enter your code directly into Step Two, I get an entirely different Bummer! message, but please let me know if this is not the case :thumbsup: