JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Using String Methods

ange yannick nimba
ange yannick nimba
727 Points

Use the JavaScript .toUpperCase( ) string method to assign an all uppercase version of the id variable to the userName

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

Steven Parker
Steven Parker
186,321 Points

If this is for task 1, you're creating the correct thing, but assigning it to "idupp" instead of "userName".

But if you're on task 2, you'll need case conversion on the name also, plus you need to insert a "#" in between the other terms.