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 trialCarl Odiloff
2,222 Pointshow to convert the string to uppercase?
let firstName = "Carl";
let lastName = "Odiloff";
let role = 'developer';
let msg = firstName + ' ' + lastName + ': ' + role;
let newForm = role.toUpperCase();
4 Answers
Steven Parker
231,248 PointsYou're using the conversion method properly, but it needs to be done as part of the string being assigned to the "msg" variable. And you won't need to create an additional variable.
Carl Odiloff
2,222 PointsThanks for your reply Steve, I appreciate it. However, I tried what you advised me but it did not work, I tried everything, but nothing seems to work, I do not know maybe there is a glitch in this system. I will try again later, never give up)
Steven Parker
231,248 PointsPlease show the exact code after your changes, perhaps there's another issue.
Carl Odiloff
2,222 PointsThat worked, still wondering how i could not come up with this. Thank you for your help
Carl Odiloff
2,222 PointsHi Steve,
Here is my code after all changes:
let firstName = "Carl"; let lastName = "Odiloff"; let role = 'developer'; let msg = firstName + ' ' + lastName + ': ' + role; msg = role.toUpperCase();
Steven Parker
231,248 PointsSteven Parker
231,248 PointsThe second assignment overwrites the first one. The case conversion should be done as part of just one assignment:
let msg = firstName + ' ' + lastName + ': ' + role.toUpperCase();