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

can't complete task.

Need help completing this please help. i'm confused.

app.js
var id = "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>

2 Answers

Steven Parker
Steven Parker
231,269 Points

It doesn't look like you've written any code yet.

If you are completely stuck and don't know where to begin, you might want to rewatch the last video: Working with Strings and Finding Help.

All the examples given for the toLowerCase method would apply equally well to toUpperCase.

Tijo Thomas
Tijo Thomas
9,737 Points

You haven't made any edits to the code. Remember, to change the content of a string variable to upper case, you have to call the toUpperCase() method on the variable. Check out the MDN documentation on the toUpperCase() method for more information.

var agency = "nasa";
var spaceAgency = agency.toUpperCase(); // returns the string "NASA" and assigns to spaceAgency variable.