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

Kayla Howard
Kayla Howard
4,655 Points

Convert the string inside variable to .toUpperCase

app.js
let firstName = "Kayla";
let lastName = "Howard";
let role = 'developer';
let msg = firstName + " " + lastName + ":" + role + ".";

2 Answers

Andjelina Stojanovic
Andjelina Stojanovic
1,928 Points

Hy,please can someone tell me why this code doesnt work for me. I rewrote everything,but still i get a bummer. Thanks

You can add it the toUpperCase() method to any string.

let firstName = "Kayla".toUpperCase();

if you want to convert the entire msg, wrap it in parenthesis.

let msg = (firstName + " " + lastName + ":" + role + ".").toUpperCase();

This helps a lot, thanks!