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

Enemuo Felix
Enemuo Felix
1,895 Points

Code challenge

please, where Am I getting it wrong?

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

5 Answers

Steven Parker
Steven Parker
231,275 Points

Your assignment needs something on the right side of the "=".

It seems that you wrote exactly what you need, but it is sitting by itself on the line above. Just make it part of the assignment.

Enemuo Felix
Enemuo Felix
1,895 Points

I added Some string on the fourth line like this

var userName="id "+"lastName" ;

but still gut the 'Bumer!'

Steven Parker
Steven Parker
231,275 Points

Did you pass task 1 already? For task 1 you just need to combine the last 2 lines shown above (in the other order).

Steven Parker
Steven Parker
231,275 Points

There are two parts to the challenge. If you are still on task 1, you just need to combine the last 2 lines in your app.js above to make a single assignment statement.

Enemuo Felix
Enemuo Felix
1,895 Points

Pls, how do I do that?

Steven Parker
Steven Parker
231,275 Points

I thought I said that above. Take what's on the line just above the last line away, and add it to the end of the last line.

An assignment ("=") must have something on both sides.

Enemuo Felix
Enemuo Felix
1,895 Points

Thanks I have done that.