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 trialSerdar Balkan
Courses Plus Student 3,368 PointsHello! Can anyone help about question of the using string methods' 2.2? thanks in advance
Using String Methods
Serdar Balkan
Courses Plus Student 3,368 PointsHi Steven,
Q : Finally, add a # symbol and lastName in uppercase to the end of the userName string. The final value of userName is "23188XTR#SMITH".
I have written this code for task 2;
var id = "23188xtr"; var lastName = "Smith";
var userName = id + "#" + lastName;
alert(userName.toUpperCase());
3 Answers
Steven Parker
231,236 PointsYou're pretty close.
Now that I see your code I can make some suggestions:
- remember in task 1 you made "an all uppercase version of the id variable"? You still need that part.
- then when you add the symbol and lastName, the lastName must also be in uppercase.
So really all you are missing is to convert each name to uppercase. And the alert is not needed for the challenge.
Serdar Balkan
Courses Plus Student 3,368 PointsSteven, Probably Im missing one thing :(
var userName = id.toUpperCase(); + "#" + lastName.toUpperCase();
Steven Parker
231,236 PointsNot "missing", but you have something "extra". You have a stray semicolon near the middle of the line right before the first "+" symbol.
Serdar Balkan
Courses Plus Student 3,368 Pointshey Steven I want to huge tanks to you You are legend :)
Steven Parker
231,236 PointsSteven Parker
231,236 PointsI'm sure you can get some help, but first please show the code you submitted for task 2 so we can see what the issue is.