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

Need help with practice

In this specific practice it ask me to use the .toUpperCase command to make the variable ID show up in Upper Case in the variable userName. However I'm not doing any progress making that happen so far. Also I'm having issue combining the Variable ID and the variable lastName so they appear together on the Variable userName. Thx for your time

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

var userName
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>

1 Answer

Martin Balon
Martin Balon
43,651 Points

Hi Rafael, problem is that you are not assigning any value to variable userName. You have to call function toUpperCase() on var id and the result of this assign to var userName. This is the code that passes the challenge:

var id = "23188xtr";
var lastName = "Smith";

var userName = id.toUpperCase();