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

uppercase

I tried everything and still doesn`t work. Someone has an idea?

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

1 Answer

You could try the code below, the main change here is that I have changed the message, to be equal to the message in uppercase, this will change the message to AMILA DURANOVIC:DEVELOPER.

In your code example, it would set the message to be just DEVELOPER as you are only applying uppercase to the role.

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

Hope this helps, please note my membership is paused at the moment, I cannot see the exact question, so I am making some presumptions that the message should be a combination of the variables you set,