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 trialKilleon Patterson
18,528 PointsWhere in the syntax do I put the "#"
How is the syntax suppose to look?
var id = "23188xtr";
var lastName = "Smith";
var userName = id.toUpperCase ()
var userName =+ 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
Colin Bell
29,679 PointsYou concatenate the #
character right after id.toUpperCase()
followed by lastName.toUpperCase()
to complete the userName variable.
var id = "23188xtr";
var lastName = "Smith";
var userName= id.toUpperCase() + "#" + lastName.toUpperCase();
// userName === "23188XTR#SMITH"
Pascal Lammers
7,856 PointsWhat do you want to do exactly? What do you mean by the "#"?
I found this mistake in your code
var userName =+ lastName.toUpperCase()
this hast to be
var userName += lastName.toUpperCas()
Jonathan Grieve
Treehouse Moderator 91,253 PointsI'm not sure what this means with the hash either.
I think you're referring to the hash (#) symbol that prefixes ID selectors in CSS or selecting ID elements in jQuery but this is not needed here.
Follow the guidance from Pascal although his suggestion needs the e
in .toUpperCase()
But you don't need to worry about a # in this challenge. :-)