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 trialJordan Winters
Front End Web Development Techdegree Student 10,360 PointsDon'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!
var id = "23188xtr";
var lastName = "Smith";
console.log(id.toUpperCase());
console.log(lastName.toUpperCase());
var userName += "23188XTR#SMITH"
<!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
Front End Web Development Techdegree Graduate 33,271 Pointsthey 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
34,055 PointsThe 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;