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 trial

JavaScript JavaScript Basics Working with Strings Combine and Manipulate Strings

challenge

converting developer to uppercase challenge task 3 javascript basics

app.js
let firstName="Malcolm";
let lastName="Mowlam";
let role = 'developer';
let msg = firstName +" " +lastName + ": "+ role;
const shout = "role"."toUpperCase()";

1 Answer

Mark Sebeck
MOD
Mark Sebeck
Treehouse Moderator 38,304 Points

Hi 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();

thanks Mark

Hi 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 : to lastName and role.

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 the role 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
Mark Sebeck
Treehouse Moderator 38,304 Points

Billy 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!!