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 trialKayla Howard
4,655 PointsHow do I convert a string stored in a variable to .ToUpperCase
I'm on step 3 of 3 in the string manipulation challenge.
3 Answers
Joseph Yhu
PHP Development Techdegree Graduate 48,637 Pointsvariable.toUpperCase();
Kayla Howard
4,655 PointsThank you so much for taking the time to reply :) I sincerely appreciate it! I did it exactly the same way and got this message.. "Bummer: Use the .toUpperCase()
method to convert the role
string to all upper-case.
"
let firstName = "Kayla"; let lastName = "Howard"; let role = 'developer'; let msg = firstName + " " + lastName + ":" + role + "."; role.toUpperCase();
Joseph Yhu
PHP Development Techdegree Graduate 48,637 Points- You were supposed to add the
toUpperCase()
method to the role variable from the previous step. - There should be a space after the colon, and there shouldn't be a period at the end.
Kayla Howard
4,655 PointsTried what you described and I'm still stuck :( Would you please demonstrate how you are saying to do it? Thank you so much for your help!!
Joseph Yhu
PHP Development Techdegree Graduate 48,637 Pointslet msg = firstName + " " + lastName + ": " + role.toUpperCase();
Kayla Howard
4,655 PointsOh my Gosh!! Thanks so much!! I wasn't adding the space after the colon... I though I was, as it turns out I didn't. I'm working off my phone, so sometimes it auto corrects what I type.
Kayla Howard
4,655 PointsKayla Howard
4,655 PointsI was finally able to copy and the code. My work is listed below. I receivedthis message. "Bummer: Use the .toUpperCase() method to convert the role string to all upper-case."
let firstName = "Kayla"; let lastName = "Howard"; let role = 'developer'; let msg = firstName + " " + lastName + ":" + role + "."; role.toUpperCase();