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

Michael Zito
PLUS
Michael Zito
Courses Plus Student 4,073 Points

Could use some advice on where to start

I've tried plugging in things here and there, but not finding a good starting point. Any pointers?

app.js
var id = "23188xtr";
var lastName = "Smith";

var userName = id.toUpperCase();
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

Hey Michael, looks like that should pass task 1. For task two (the question is a bit awkwardly phrased) they want you to concatenate a id and lastName together into a string, with a '#' pound symbol in the middle and all letters in uppercase.

Let me know if you don't follow the pointer below and i'll be happy to explain further.

var id = "23188xtr";
var lastName = "Smith";

// var userName = id.toUpperCase() + (add pound symbol here) + (add uppercase lastName here);
Michael Zito
Michael Zito
Courses Plus Student 4,073 Points

var userName = id.toUpperCase() + ("#") + (lastName.toUpperCase);

This is what I came up with on this, and it wasn't successful. Anything stand out?

Hei Michael Zito Which task are you having problems with task one or two of the challenge ?