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 trial

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Using String Methods

Having a hard time passing this task 2.

Not sure what Im doing wrong but I've watched the video several times and Im still lost as to adding the symbol and lastName to the UpperCase. I got the first part but then Im stumped on the second task.

app.js
var id = "23188xtr";
var lastName = "Smith";

var userName = id.toUpperCase();
index.html
<!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>
var id = "23188xtr";
var lastName = "Smith";

var userName = id.toUpperCase() + "#" + lastName.toToUpperCase();
Steven Parker
Steven Parker
231,269 Points

:warning: Posting explicit code solutions without explanation is strongly discouraged by Treehouse, and subject to redaction by staff or moderators.

3 Answers

Steven Parker
Steven Parker
231,269 Points

Hint: You can join strings together using the concatenation operator, which uses the same symbol as addition for numbers ("+").

yea my bad - sorry :( actually wanted to share link for more info about strings concatenation but forgot - http://javascript.info

Steven Parker
Steven Parker
231,269 Points

That's good but you should also revise your other comment and at least add some description of the code differences.

Thank you Cobe Learns for providing me with some help on that problem. I didn't mean to get you in trouble though. And thanks for the extra links!!

Thank you Cobe Learns for providing me with some help on that problem. I didn't mean to get you in trouble though. And thanks for the extra links!!