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

Convert string to Uppercase using .toUpperCase() Method

suppose to convert string "role" to uppercase using '.toUpperCase'

app.js
let firstName = "Riley";
let lastName = "Weishaupt";
let role = 'developer';
const msg = firstName + " "+ lastName + ":" + role + ".";

I'm supposed to convert the 'role' string to uppercase.

can I see your updated code that is throwing the error?

1 Answer

Hi, in order to make role into uppercase you add .toUpperCase to role I hope this helps

let firstName = "Paul";
let lastName = "Messmer";
let role = 'developer';
const msg = firstName + " " +  lastName + ": " + role.toUpperCase();

So I tried that, this is the error I'm getting ... 'Bummer: Make sure you're concatenating : to lastName and role.' soit's basically backtracking me (to the last challenge) when I put that in.