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 trialAlexandru Pescaru
6,410 Pointscan anyone help me here with the toUpperCase please
let firstName = "Alex";
let lastName = "Pescaru";
let role = 'developer';
let msg = firstName + ' ' + lastName + ":" + role + "."
let msg = role.toUpperCase();
1 Answer
Sumana Vittal
4,909 Pointslet firstName = 'Alex'; let lastName = 'Pescaru'; let role = 'developer'; let msg = firstName+' ' +lastName+ ':'+ ' '+role.toUpperCase()+ '.';
console.log(msg);
Justyna Szofinska
6,178 PointsJustyna Szofinska
6,178 PointsI 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.