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

Finally, add a # symbol and lastName in uppercase to the end of the userName string. I dont understand this question

I dont understand how this is supposed to work. I tried var username = id+lastName.toUpperCase(); I have tried username = id#lastName.toUpperCase(); and several other ways.

app.js
var id = "23188xtr";
var lastName = "#Smith";

var userName = id+lastName.toUpperCase();
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="app.js"></script>
</body>
</html>

3 Answers

Timothy Schmidt
Timothy Schmidt
4,806 Points

Remember that the second stage is supposed to be added on to the first. In the first stage you made id uppercase, but in this one you are no longer doing that.

var userName = id.toUpperCase()+lastName.toUpperCase();
Steven Parker
Steven Parker
231,275 Points

Don't forget the "#" symbol.

Timothy is right, but also remember to put a "#" symbol between the converted id and the converted last name. Don't change the last name string itself, just join that in using concatenation with the other parts

Thank you guys I ended up figuring it out. I thought the # was a command. But I realized it was part of the string. Took me a nice little break from the computer to figure it out.