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 trialCallie Crownover
1,588 PointsWhat is the correct answer to this question?
Where am I going wrong with this?
let firstName = "Callie";
let lastName = "Crownover";
let role = 'developer';
let msg = firstName + " " + lastName + ": " + role;
let shout = role.string.toUpperCase();
4 Answers
Mei Lee
3,339 Pointsalmost, let's try role.toUpperCase()
Rohald van Merode
Treehouse StaffHi Callie,
You can use the toUpperCase() method right on your role variable, so without the .string inbetween. Next you'll have to move your shout variable up above the string concatenation otherwise it won't be specified when the string code runs. At last change the role in your string to shout. Since the role value will still be lowercase and the uppercase is saved to shout.
let firstName = "a";
let lastName = "b";
let role = 'developer';
let shout = role.toUpperCase();
let msg = firstName + " " + lastName + ": " + shout;
Rohald van Merode
Treehouse Staffor just simply add .toUpperCase inside your string...
let msg = firstName + " " + lastName + ": " + role.toUpperCase();
Nicole Antonino
12,834 PointsMei Lee is right, you use just role.toUpperCase(), but you also don't even need to create that new variable of shout. You can just add the .toUpperCase() to the end of the variable 'role' when concatenating in the msg variable:
let firstName = "Callie";
let lastName = "Crownover";
let role = 'developer';
let msg = firstName + " " + lastName + ": " + role.toUpperCase();
Rogier Bogaards
3,315 Pointswhat is wrong here? still Bummer feedback!
let firstName = "Rogier"; let lastName= "Bogaards"; let role = 'developer';
let msg = firstName + ' ' + lastName + ':' + role.toUpperCase();
Rohald van Merode
Treehouse StaffHey Rogier,
It looks like there's a space missing behind the : with changing that it passed for me. Hope that helps :)