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 trialMicheal Jones
3,972 PointsI have no idea what im doing wrong here.
let firstName = "micheal";
let lastName = "jones";
let role = "developer";
let msg = "micheal "+ "jones: " + "developer";
let msg = role.toUppercase();
3 Answers
Steven Parker
231,248 PointsI 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 writefirstName + " " + lastName + ": "
- the role is only part of the message and should be concatenated with the rest
Ashton Little
7,352 Pointslet firstName = "John";
let lastName = "Doe";
let role = "developer"
let msg = firstName + " " + lastName + ": " + role.toUpperCase();
Ashton Little
7,352 PointsSorry itβs sloppy, on cell
Micheal Jones
3,972 PointsSorry man theres just something im not getting. Im trying to set "developer" into uppercase letters.
Micheal Jones
3,972 Pointsshouldn't it be..... role.UpperCase();
Steven Parker
231,248 PointsMicheal Jones β The correct method name is "toβUpperCase()".
Ashton Little
7,352 Pointsits 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();
Micheal Jones
3,972 PointsMicheal Jones
3,972 PointsSorry Im still lost on this im trying to set developer into uppercase letters.
Micheal Jones
3,972 PointsMicheal Jones
3,972 Pointsshouldn't it be ...... role.UpperCase();