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 trialskehrt
7,271 PointsUmm, Dave - I did as you said and it still doesn't work?
Hi, Dave - see ... I copy & pasted your rpely to me as you advised & it gives me the same answer
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>
3 Answers
Cory Harkins
16,500 PointsYou have a syntax error after id.toUpperCase()
remove the semi-colon
Unsubscribed User
13,197 PointsThis is the correct solution:
var userName = id.toUpperCase() + "#" + lastname.toUpperCase();
The semicolon after the first call of toUpperCase is what causes it to fail as this is a syntax error.
Dave StSomeWhere
19,870 PointsUmmm, skehrt - here's what is needed for the challenge:
If you follow the challenge they have you to add the # (pound sign) and upper case to the userName defined in task 1. So you need to show the completed task 1 and a separate statement for task 2 - something like below:
var userName = id.toUpperCase();
userName += '#' + lastName.toUpperCase();
skehrt
7,271 Pointsskehrt
7,271 PointsThanks, Cory - I just did that per another advisor (which I'm pretty sure is something I tried before getting to the point of asking for help) - it still doesn't work. I actually copy & pasted it from the 2nd person - which was exactly the same as yours - it doesn't work. Thanks so much!