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 trialShana Gibson
8,788 Pointsi guess im not understanding how to combine these strings with the # symbol, i've tried everything, i dont get it
var id = "23188xtr"; var lastName = " Smith";
var userName= id.toUpperCase ();+ lastName.toUpperCase();
i guess im not understanding how to combine these strings with the # symbol, i've tried everything, i dont get it, how do i combine the two var id and lastName with the pound symbol so that it reads 23188XTR#SMITH
var id = "23188xtr";
var lastName = " #Smith";
var userName= id.toUpperCase ();+ lastName.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>
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! I feel like you're doing really well and a lot of students get tripped up on this. I feel like maybe you're assigning some special importance to the #
sign that isn't really there. It's just a character like any other.
That being said, you have a semicolon in the middle of the line which is the end of the statement and you definitely don't want that.
Let me try to give an example here without the actual solution. I'm going to turn everything to lower case and then combine it with an "@" symbol.
var myFirstName = "JENNIFER";
var myLastName = "NORDELL";
var nameJoinedWithAt = myFirstName.toLowerCase() + "@" + myLastName.toLowerCase();
The value that would then be stored in nameJoinedWithAt
would be "jennifer@nordell".
I think you can get it with these hints, but let me know if you're still stuck!
Shana Gibson
8,788 PointsShana Gibson
8,788 Pointsthank you so much, i did try that, but i did still have that semi colon there, thanks i was bout to go crazy lol!!