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 trialAristide Tosi
1,020 PointsMy code doesn't work, but it reads correctly to me. What did I do wrong?
var id = "23188xtr"; var lastName = "Smith"; id.toUpperCase(); var userName lastName.toUpperCase(); userName += id + +"'#'+ lastName;
var id = "23188xtr";
var lastName = "Smith";
id.toUpperCase();
var userName
lastName.toUpperCase();
userName += id + +"'#'+ lastName;
<!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
Garrett Sanderson
12,735 Pointsvar id = "23188xtr";
var lastName = "Smith";
id.toUpperCase();
var userName
lastName.toUpperCase();
userName += id + +'#'+ lastName; // Took out the one double quote before the hash
Aristide Tosi
1,020 PointsAristide Tosi
1,020 Pointsvar id = "23188xtr"; var lastName = "Smith"; id.toUpperCase(); var userName; userName += id + +'#'+ lastName;
That additional quote shouldn't have even been there, but the problem remains. It still won't read this as a concatenation so I don't know what it expects me to do?
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsThere's also an extra
+
in that last line.userName += id + '#' + lastName; // removed an extra +