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
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 PointsI can't find uppercase solution var id = "23188xtr"; var lastName = "Smith"; var userName = #lastName.toUpperCase()
var id = "23188xtr"; var lastName = "Smith"; var userName = #lastName.toUpperCase() alert("#lastName.toUpperCase());
I am lost now how to do all uppercase
3 Answers
Unsubscribed User
13,197 PointsIf this is the challenge I think it is, this should be the solution. You need to make the id and username uppercase by using the toUpperCase method on each variable as you create the userName variable.
var id = "23188xtr";
var lastName = "Smith";
var userName = id.toUpperCase() + "#" + lastname.toUpperCase();
Don't remember needing to create an alert but once you've got your userName variable set you can create the alert by doing this:
alert(userName);
Mustafa Khan
6,224 PointsYou don't need to add a hashtag. Instead you need to concat the hashtag along with it. var id = "23188xtr"; var lastName = "Smith"; var username = '#' + lastName.toUpperCase() I'll let you figure out the rest. Cheers!
skylar stanley
Courses Plus Student 5,870 Points//in order to obtain the end result "23188xtr#SMITH" :
var id = "23188xtr";
var lastName = "smith";
var username = id + "#" + lastName.toUpperCase();
alert(username);
// i hope that this helps you :)