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

Don't know what I'm doing wrong

Anyone able to help? I don't know what it is asking me to do I guess. I tried everything I thought would work but I am stuck. Thanks!

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

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

they are not asking you to log anything to the console, just to set the variable values using the requested methods and string concatenation. any debugging print statements etc that are not asked for in a challenge will cause it to fail. only do what is asked.

Benjamin Larson
Benjamin Larson
34,055 Points

The logging statement technically won't cause a failure in this case. You have the usage correct for the .toUpperCase() method you just need to concatenate those together along with the # symbol. The concatenation operator in Javascript is the "+" symbol.

It should take something of the form of the following, only using the given variables and upper case methods:

var firstName = "First";
var lastName = "Last";

var fullName = firstName + "M.I." + lastName;