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

terry okey
terry okey
3,187 Points

On challenge 3 I can't remember ever being told where the "toUpper Case" method goes in the line?

We are trying to get a string that says "Terry Okey: DEVELOPER". Should the method go in a line above the concatenation

app.js
let firstName = "Terry";
let lastName = "Okey";
let role = "developer";
let msg = firstName + " " + lastName + ": " + role = word.toUppercase();

2 Answers

Rick Gleitz
Rick Gleitz
47,878 Points

Hi Terry,

You are very close! You seemed to have redefined role. What you need is to use the .toUpperCase() method to modify role. So just delete everything between role and .toUpperCase() and you're done. Don't forget to capitalize the C in case!

Hope this helps!

terry okey
terry okey
3,187 Points

Oh right, I am trying to change the value of role this way, no good. I was looking for a way to change to upper case without changing the value of "role" just for this string, and toUpperCase is a method to be called directly on the variable.