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

can anyone help me here with the toUpperCase please

app.js
let firstName = "Alex";
let lastName = "Pescaru";
let role = 'developer';
let msg =  firstName + ' ' + lastName + ":" + role + "."
let msg = role.toUpperCase();
Justyna Szofinska
Justyna Szofinska
6,178 Points
let firstName = "Alex";
let lastName = "Pescaru";
let role = 'developer';
let msg =  firstName + ' ' + lastName + ":" + role.toUpperCase(); + ".";
console.log (msg);

I don't know exactlly what you want to achive with this code, but first you forgot semicolumn in 4 line, and you don't have line of code to show you what the msg variable contains. In let variable you can add new information by += sign, but you can't have two different informations. You can also create new variable " let upper = role.toUpperCase();", and then in "let msg" you will use "upper" instead "role". I hope I helped a little.

1 Answer

let firstName = 'Alex'; let lastName = 'Pescaru'; let role = 'developer'; let msg = firstName+' ' +lastName+ ':'+ ' '+role.toUpperCase()+ '.';

console.log(msg);