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

.toUpper

What have I done wrong with this code?

app.js
var firstName = "Dorian";
var lastName = "Ellison"; 
var role = "developer";
var msg = `${firstName} ${lastName}: ${role}`;
role.toUpperCase();

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Dorian Ellison! You're calling the correct method, but in the incorrect spot. It should be on the same line where you have the let msg =. So instead of ${role}, you're looking for ${role.toUpperCase()}.

Currently, you're performing the conversion to upper case on role after the msg variable is defined but we want it as part of the message.

Hope this helps! :sparkles:

makes perfect sense. Thank you!

raphael bardwell
raphael bardwell
719 Points

Hi,

thank you for the advice!Was scrambled for hours!