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 trialJonathan Morton
7,942 PointsHow do I pass this question without invalidating the first task?
I can't remember how to add strings and i don't know what i am doing wrong
var id = "23188xtr";
var lastName = "Smith";
var userName = id.toUpperCase();
userName += '#' + lastName.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>
4 Answers
Jesus Mendoza
23,289 PointsHey Jonathan,
Try concatenating the string in one line
Steven Parker
231,248 PointsYou spelled "toUppercase" (the second time) with a lower-case "c".
It needs to be "toUpperCase", as you wrote it the first time.
Just a little typo. Otherwise, you got it.
Dor Sarel
9,987 PointsHi,
first of all - you are adding strings in the right way! :) the problem with your code is when making the lastName variable uppercase you forgot to capital the letter "c" in the word case. toUppercase() ==> toUpperCase();
Hoped i helped.
Jonathan Morton
7,942 PointsIt was in fact the capital letter 'C' thanks guys !!!
Steven Parker
231,248 PointsSteven Parker
231,248 PointsIt could be done on one line. But it doesn't need to be.