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

Toryan Reed
Toryan Reed
1,750 Points

How do you use the JavaScript .to uppercase method to assign all uppercase version of the ID variable to the username?

I'm having a hard time with those 2 challenge questions do you have any advice?

var id = "23188xtr";
var lastName = "Smith";
var = username = SMITH
var userName
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="app.js"></script>

1 Answer

james south
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,271 Points

the syntax is myString.toUpperCase(). it returns myString in all caps. that is the value you set your variable to. var myVar = myString.toUpperCase().