Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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: