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

how to convert uppercase

I have no idea what to do next. How do I change the role variable in the string for msg to all capital. Thank you!

app.js
let firstName = "Carl";
let lastName = "Mclamb";
let role = 'developer';
let msg = firstName + " " + lastName + ":"  + role.toUpperCase() + "."; 

3 Answers

Blake Runyon
seal-mask
.a{fill-rule:evenodd;}techdegree
Blake Runyon
Full Stack JavaScript Techdegree Student 7,539 Points

Hey Dude,

I think the problem you're having is more simple than you're thinking. If you re-read the challenge, they're looking for:

Carl Mclamb: DEVELOPER

You've written it as:

Carl Mclamb:DEVELOPER.

let firstName = 'Blake';
let lastName = 'Runyon';
let role = 'developer';
let msg = firstName + " " + lastName + ": " + role.toUpperCase();

I'm also new to JavaScript. One thing I've learned is to make sure you don't get tunnel vision on the complex problems and miss out on simple mistakes. Normally, for me at least, I make many simple mistakes haha. Good coding!

Thanks man!

Thanks man. Sorry it took me a while to reply

in order to convert the string 'role' into uppercase you need to use, console.log( role.toUpperCase() ); on the following line, which is line 5. the same is true for lower case, console.log( role.toLowerCase() );