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 trialRyan Abbott
5,822 PointsHelp, I am not sure what I am messing up. 1st time learner here.
Keeps saying the I didn't add the '#' between 'id' and 'lastName'.
var id = "23188xtr";
var lastName = "Smith";
var userName = (id) + "#" + (lastName);
userName.toUpperCase ();
<!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>
5 Answers
Joshua Edwards
52,175 PointsYou need to apply toUpperCase() to post the id variable and the lastName variable while doing the assignment to the userName variable and not putting it all together and then doing toUpperCase() on it.
Michael Fish
7,804 PointsHi Ryan,
The challenge wants you to turn the # symbol into a variable. Try using this :
var id = "23188xtr";
var lastName = "Smith";
var hash = '#';
var userName = id.toUpperCase() + hash + lastName.toUpperCase();
Raymond Osier
16,581 Pointsthis is what you need to do in the first step ```var id = "23188xtr"; var lastName = "Smith";
var userName = id.toUpperCase ();
Raymond Osier
16,581 Points// the second step should look something like this
var id = "23188xtr";
var lastName = "Smith";
var userName = id.toUpperCase()+ "#"+ lastName.toUpperCase();
remeber when you are calling a function like the toUpperCase you must include () i can further exsplain what exactly this code means if you would like a more indepth review
Raymond Osier
16,581 Pointsinside the var userName you are calling the var id and using the function toUpperCase() to change the value of id to all uppercase then you are concatenating that var by adding + with the string "#" and concatenating again with another
- to the var lastName witch you called the same function of toUpperCase() on
Mike Burnett
8,429 PointsMike Burnett
8,429 PointsHi Ryan. I think it wants you to do everything on one line. Also, you don't need parentheses around your variable names.
So something like
var userName = upper case id + hash tag + upper case last name;