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

I have no idea what im doing wrong here.

app.js
let firstName = "micheal";
let lastName = "jones";
let role = "developer";
let msg = "micheal "+ "jones: " + "developer";
let msg = role.toUppercase();

3 Answers

Steven Parker
Steven Parker
229,732 Points

I guess my previous hints weren't quite sufficient. Here's a few more:

  • you should use the variables to create the message
  • for example, instead of "micheal " + "jones: " you might write firstName + " " + lastName + ": "
  • the role is only part of the message and should be concatenated with the rest

Sorry Im still lost on this im trying to set developer into uppercase letters.

shouldn't it be ...... role.UpperCase();

Ashton Little
Ashton Little
7,352 Points

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

Ashton Little
Ashton Little
7,352 Points

Sorry it’s sloppy, on cell

Sorry man theres just something im not getting. Im trying to set "developer" into uppercase letters.

shouldn't it be..... role.UpperCase();

Steven Parker
Steven Parker
229,732 Points

Micheal Jones β€” The correct method name is "to‍UpperCase()".

Ashton Little
Ashton Little
7,352 Points

its role.toUpperCase()..... role.UpperCase() will not do anything as that is not the correct method (think this is correct term)

So we define a total of three variables let firstName = "Jim" let lastName = "Bob" let role = "developer"

THEN WE WILL CONCATENATE

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