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 trialJack Christie
186 PointsConvert a string to uppercase letters
var id = "23188xtr"; var lastName = "Smith";
The question asks me to convert the ID and name to all uppercase letters.
var userName = lastName + id.toUpperCase(); // This is what I typed in, but it keeps telling me it's not the answer.
var id = "23188xtr";
var lastName = "Smith";
var userName = lastName + id.toUpperCase();
<!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
231,236 PointsAre you on task 1 or 2? If I remember correctly, task 1 is just id, so "lastName" shouldn't be there.
And if it's task2, the id needs to come before the last name, the last name also needs to be upper-cased, and there should be a "#" symbol in between them.
Jack Christie
186 PointsJack Christie
186 PointsThanks. I will try that. Been busy with school. I am taking JavaScript in school too.