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 trialIsrael Imru
5,297 PointsBug in quiz? It keeps telling me that my (correct answer) is not that same as (correct answer).
I can easily just skip this (and I have), but whenever I click "Resume Track" it brings me back here because it's unresolved. My code spits out the correct answer, but it's not letting me submit it. I'm assuming I may have done it differently than they'd like. Can somebody point me in the right direction?
var id = "23188xtr";
var lastName = "Smith";
id.toUpperCase();
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>
2 Answers
jcorum
71,830 PointsIsrael, you are so close!! I tried your solution in the Challenge, and although it didn't mind the
id.toUpperCase();
in the first task, it doesn't like it in the second. As it happens, you don't need this line at all. The results of this method call just get thrown away, as you don't print it, or assign it to a variable, or use it as a parameter in another method call, etc. Calling it twice, as you do in the next line is all that's needed, as the results there are concatenated and assigned to userName. In short, all you need is this:
var userName = id.toUpperCase() + "#" + lastName.toUpperCase();
jcorum
71,830 PointsWe've all been there!!
Israel Imru
5,297 PointsIsrael Imru
5,297 PointsOh, you're right. I feel silly.
Thanks!