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

I can't give over for this step......

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

var userName = "variable";

console.log(id.length); console.log(id.toLowerCase()); console.log(id); console.log(id.toUpperCase());

console.log(lastName.toUpperCase());

...using string concatenation so that the final value of userName is "23188XTR#SMITH"

Can I help me? Thanks....

3 Answers

Hey Massimo,

That challenge is asking you to combine the values of the id and lastName variables using a # and store the result in a new variable called username, like this:

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

var userName = id + "#" + lastName; // this evaluates to "23188XTR#SMITH"

...OPS...this is the new message (Bummer!): Did you call 'toUpperCase()' on 'LastName'? Why?

It's because the last name needed to be in all caps, per the instructions. You do that like this:

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

var userName = id + "#" + lastName.toUpperCase(); // this evaluates to "23188XTR#SMITH"

thanks