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

Concatenation with #

Help please.

5 Answers

Krzysztof Kucharzyk
seal-mask
.a{fill-rule:evenodd;}techdegree
Krzysztof Kucharzyk
Front End Web Development Techdegree Student 4,005 Points

Ohhh sorry then I thought that was for the first task :P

So to make this work you should have this code:

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

Thanks, Krystof. I did not see this equation in the lesson. If you don't mind my asking, where did you learn this variable pattern?

Thank you but that's not the answer to the question I posted. That's the first answer to the first question. I'm looking for the second answer that includes the '#' symbol.

The problem to solve is this: Complete the assignment to the userName variable by adding a # symbol followed by an all uppercase version of the lastName variable. In other words, using string concatenation so that the final value of userName is "23188XTR#SMITH".

Krzysztof Kucharzyk's first answer is correct. If you need help understanding why, we will be happy to help.

That's not the answer. I received this message: You only need to call toUpperCase() on id and lastName. I cut and paste first. then I typed it in myself. Both returned the above message.

Krzysztof Kucharzyk
seal-mask
.a{fill-rule:evenodd;}techdegree
Krzysztof Kucharzyk
Front End Web Development Techdegree Student 4,005 Points

Take a look at the above answer. This suppose to work here:

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

You call here toUpperCase() on both id and lastName