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

I dont really know what to do, can someone please explain to me what I schould do to get it to work.

I cant get past the question

app.js
var id = "23188xtr";
var lastName = "Smith";
var userName = id;
(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>

3 Answers

SRIMUGAN J
PLUS
SRIMUGAN J
Courses Plus Student 5,345 Points

Hi Adam,

In Your app.js you are actually changed the id to uppercase and stored it into the same id variable. If you want to assign the uppercase values to user name you'll do like this

var username = id.toUpperCase();

convert id variable into uppercase and assign it to user name.

Hope this helps :)

thanks!

I tried but it just said: Bummer! The userName variable is "undefined" not "23188XTR#SMITH".

SRIMUGAN J
SRIMUGAN J
Courses Plus Student 5,345 Points

Hi Adam,

Did you do like this below?

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

I works now, thanks =).