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 trialAbdulrahman Teima
1,091 PointsI need help with the second task of this lesson I can't understand the questione very well
Can anybody Help me by explaining the question?
var id = "23188xtr";
var lastName = "Smith";
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>
3 Answers
Alexandra Barnett
Front End Web Development Techdegree Graduate 46,473 PointsHi Abdulrahman! The second task wants you to add more to the username variable. Firstly it wants you to add a hash symbol and then add the surname (lastName variable) to the string in uppercase. You are concatenating the string. I have put the code below to help you but, let me know if you have any questions :)
var id = "23188xtr";
var lastName = "Smith";
var userName = id.toUpperCase() + '#' + lastName.toUpperCase();
Alexandra Barnett
Front End Web Development Techdegree Graduate 46,473 PointsHi Greg Kaleka sorry - I hadn't realised you could do that - thanks for the info :)
Abdulrahman Teima
1,091 Pointsthank you all for your support :)
Andrew Young
Courses Plus Student 639 PointsAndrew Young
Courses Plus Student 639 PointsHey Alexandra would you be likely to change the script rendering to js change the line to ```
js
to be more comfortable to view the syntax highlighting thanks :)Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsAlexandra, great answer! Just to expand on Andrew's suggestion: if you add the language after your backtics, you'll get syntax highlighting. I took the liberty of doing so for you. You can edit your answer to see it. Looks like this, though:
```js
[code]
```
You can do this with HTML, CSS, PHP, Python, SQL... pretty much all the languages taught here on treehouse.
Thanks for participating, and happy coding!
Cheers
-Greg
Abdulrahman Teima
1,091 PointsAbdulrahman Teima
1,091 Pointsthanks for your support,