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 trialAmy Tomey
12,847 PointstoUpperCase
I have looked at references and the hints... I have NO idea what I am doing wrong. how do I turn developer all caps?
let firstName = "Amy";
let lastName = "Tomey";
let role = 'developer';
const shout = role.toUpperCase();
const msg = firstName + ' ' + lastName + ': ' + role;
1 Answer
Cameron Childres
11,820 PointsHey Amy,
Good job fixing the other issues.
Right now you've converted the value of role
to uppercase successfully and stored it in the variable shout
. Your msg
is still using the original role
variable however, which is lowercase.
You can go about this a couple of ways from here -- either replace role
with shout
for the message:
const msg = firstName + ' ' + lastName + ': ' + shout;
Or omit shout
entirely and use the toUpperCase()
method directly on role
in the message:
const msg = firstName + ' ' + lastName + ': ' + role.toUpperCase();