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

Tenzin Kalsang
PLUS
Tenzin Kalsang
Courses Plus Student 189 Points

Hi, I need help on this. How to add .toUpperCase() to let role = 'developer';?

app.js
let firstName ='Tenzin';
let lastName = 'Kalsang';
let role = 'developer';
let msg ='Tenzin '+'Kalsang '+': developer'

3 Answers

Hi Kalsang,

If I understand your question correctly, just work with your quotes and insert the role variable to display the 'developer' name. When you write your code for the output, it should display correctly. Something like this:

let msg ='Tenzin ' + 'Kalsang ' + ': ' + role.toUpperCase();

Cheers!

Hi, I have the same question and I've tried multiple times but apparently my answer is not correct: let firstName = 'Mario'; let lastName = 'Luna' ; let role = 'developer'; let msg = firstName + ' ' + lastName + ':' + role.toUpperCase() + '.';

The challenge is expecting the string to be in a slightly different format. Have you tried changing ':' to ': ' and removing + '.' from the end?

Hi, I have the same question and I've tried multiple times but apparently my answer is not correct: let firstName = 'Mario'; let lastName = 'Luna' ; let role = 'developer'; let msg = firstName + ' ' + lastName + ':' + role.toUpperCase() + '.';