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
Abdurashid Mahad Isse
7,062 Pointsplease help me with code
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”.
var id = "23188xtr"; var lastName = "Smith";
var userName id.toUpperCase();
2 Answers
Ali M Malik
33,293 PointsYou need to use the assignment operator = first to assign the value to the variable. Then concatenate the strings together with the +.
var id = "23188xtr"; var lastName = "Smith";
var userName = id.toUpperCase() + '#' + lastName.toUpperCase();
Constance Merritt
6,936 PointsMy solution is
userName +="#";
userName +=lastName.toUpperCase();
Jeremy Woodbridge
25,278 PointsJeremy Woodbridge
25,278 PointsExactly my answer on that challenge as well, this should work