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 trialFrank Grillo
Front End Web Development Techdegree Graduate 16,715 PointsConvert Last Word to Capital Letters
How do I convert the last word in the string to Capital Letters?
let firstName = 'Frank';
let lastName = 'Grillo';
let role = 'developer';
let msg = firstName + ' ' + lastName + ':' + role + '.';
let word = 'developer';
let shout = developer.toUpperCase();
1 Answer
Mark Sebeck
Treehouse Moderator 37,905 PointsHi Frank. Couple of issues here. First delete word and shout. Those are not needed. Your format for changing to uppercase on shout is correct. Move that to role on the msg variable.
Now you also have to be careful and build the msg string exactly like they ask. So you need a space after the :. So it should be like + ‘: ‘. And then also get rid of the period at the end. They didn’t ask for that. Hope this helps Frank and post back to the community if you are still stuck.
Frank Grillo
Front End Web Development Techdegree Graduate 16,715 PointsFrank Grillo
Front End Web Development Techdegree Graduate 16,715 PointsThank you so much!
Mark Sebeck
Treehouse Moderator 37,905 PointsMark Sebeck
Treehouse Moderator 37,905 PointsYou are welcome Frank. Happy to help.