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 trialramseydennis
4,530 PointsHaving trouble with this question - what's wrong with my code?
Hey guys, - here is my code for this question -
' ' ' var id = "23188xtr"; var lastName = "Smith"; var id = lastName.toUpperCase(); var lastName += "#"
var userName = id.toUpperCase();
' ' '
var id = "23188xtr";
var lastName = "Smith";
var id = lastName.toUpperCase();
var lastName += "#"
var userName = id.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
john larson
16,594 PointsI must say, i got halfway through conditional statements and decided to start js over. Second time through is really helping.
Ramiro Martinez
13,858 PointsTry this, it works..
var userName = id.toUpperCase() + "#" + lastName.toUpperCase();
Samuel Webb
25,370 PointsSamuel Webb
25,370 PointsI would highly recommend that you run through the JS Basics course again. This question means you don't have a complete grasp on the concepts of: creating variables, assigning values to variables and string concatenation. All three of these concepts are vital to JavaScript and It would probably be best to go back and make sure you have a solid understanding of these before moving on.