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 trialmalcolm mowlam
3,856 Pointschallenge
converting developer to uppercase challenge task 3 javascript basics
let firstName="Malcolm";
let lastName="Mowlam";
let role = 'developer';
let msg = firstName +" " +lastName + ": "+ role;
const shout = "role"."toUpperCase()";
1 Answer
Mark Sebeck
Treehouse Moderator 37,799 PointsHi Malcolm. You are overthinking it, You simply need to add .toUpperCase() to the role in the msg string. So the end of your msg should look like this:
+ role.toUpperCase();
malcolm mowlam
3,856 Pointsmalcolm mowlam
3,856 Pointsthanks Mark
Billy White
Full Stack JavaScript Techdegree Student 1,096 PointsBilly White
Full Stack JavaScript Techdegree Student 1,096 PointsHi Mark,
let firstName ="Billy"; let lastName = "White"; let role = 'developer';
let msg = firstName + ' ' + lastName +':' + role.toUpperCase();
Error Message for the first: Bummer: Make sure you're concatenating
:
tolastName
androle
.let firstName ="Billy"; let lastName = "White"; let role = 'developer';
let msg = firstName + ' ' + lastName +':' + role.toUpperCase() + '. ';
Error Message for the second: Bummer: Use the
.toUpperCase()
method to convert therole
string to all upper-case.Both of these outputs as strings are not working. Weird.
Third option is to create a new var let role_2 += role; But you can't modify the 'role' variable inside the string (i.e.original role.) I am going over to freeCodeCamp and practice. Thanks for your help.
Mark Sebeck
Treehouse Moderator 37,799 PointsMark Sebeck
Treehouse Moderator 37,799 PointsBilly Iβm just looking at this on my phone but I think you just need a space after the colon and delete the period at the end. The challenges are very picky and you have to have strings exactly the way they want or they wonβt pass. Good news is you understand the code part. Keep at it!!