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 trialTadjiev Codes
9,626 PointsFinally, convert the string stored in role to uppercase letters. The final msg string should look similar to this: "Carl
Finally, convert the string stored in role to uppercase letters. The final msg string should look similar to this: "Carl
let firstName = "Muhammed";
let lastName = "Tadjiev";
let role = 'developer';
const msg = firstName + " " + lastName + ":" + role + ".";
let bigLetters = role.toUpperCase();
17 Answers
Tadjiev Codes
9,626 PointsYou're welcome) Don't forget to click it as the Best answer and +1 LOL)
Volodymyr Rusnyk
9,657 PointsHow Can I do it?
Shung Chen
6,526 Pointslet msg = firstName + ' '+ lastName +':' + ' '+ role.toUpperCase();
Tadjiev Codes
9,626 PointsJust by clicking the button Best Answer Lol. Thanks
Tadjiev Codes
9,626 PointsString interpolation I meant*
Volodymyr Rusnyk
9,657 PointsMukhammadkhon Tadjiev, you so helpful. The code is working, thank you so much!
benoit koch
3,875 Pointsyes! this worked lol . I have been racking my brain over this.
Gavin Eyquem
Front End Web Development Techdegree Student 21,339 PointsI've been trying different ways to get this right and your answer worked for me. This tells me that the JavaScript Basics course need updating.
Fran ADP
6,304 Pointsuse msg
Dimitar Dimitrov
11,800 PointsYou can use the method .toUpperCase() in the string concatenation
const msg = firstName + " " + lastName + ":" + role.toUpperCase() + ".";
or you can use the new ES syntax and type it like that which is far more readable
let msg = `${firstName} ${lastName}: ${role.toUpperCase()}`;
z7
2,268 Pointsso I typed this
let letters = role.toUpperCase();
and its giving me the error "Bummer: Use the .toUpperCase()
method to convert the role
string to all upper-case."
what am I doing wrong?
Volodymyr Rusnyk
9,657 PointsNo, how to add upper case to role string
Dimitar Dimitrov
11,800 Pointsconst msg = firstName + " " + lastName + ":" + role.toUpperCase() + ".";
this is the answer and it has been aswered in the same thread you add .toUpperCase() to the role variable.
Volodymyr Rusnyk
9,657 PointsIs anybody know how to add UpperCase to role? I have tried all those methods and it doesn’t work I don't know why?
Tadjiev Codes
9,626 Pointslet msg = `${firstName} ${lastName}: ${role.toUpperCase()}`;
Try to use the ES syntax with the string interiorlation. Well at least it worked for me) The challenge probably wants to use the new Syntax
Kate C
13,589 PointsIt is so weird instead of typing the answer like :
const msg = firstName + " " + lastName + ":" + role.toUpperCase() + ".";
the system only accept :
const msg = ${firstName} ${lastName}: ${role.toUpperCase()}
;
But at this point, we don't know the answer the system accept.
djsands
6,286 Pointsso as was going over this again ,.. this is what I thought the answer would be, as it made sense with what we had learnt so far .. .. let msg = firstName + " " + lastName + ":" + role.toUpperCase() + "."; but alas this is the correct answer, let msg = ${firstName} ${lastName}: ${role.toUpperCase()}
; and I am feeling abit lost now .. .
Tadjiev Codes
9,626 PointsHey, this is just a new way of string concatenation or string interpolation in other words. The handy part of the new method you don't need bunch of + pluses as it'll contact anyways and even create space when you leave some blank space. But you need also backticks to begin and to close
Volodymyr Rusnyk
9,657 PointsIs anybody know the answer? because I am stuck on it, please help https://teamtreehouse.com/library/javascript-basics/working-with-strings/combine-and-manipulate-strings
Tadjiev Codes
9,626 Pointslet firstName = "Tadjiev"; let lastName = "Ruslan"; let role = 'developer';
This is the answer to what you're asking?
Volodymyr Rusnyk
9,657 PointsI don't know why but it didn't work.
Volodymyr Rusnyk
9,657 PointsDimitar Dimitrov, you so helpful, The code is working, thank you so much!
Rogier Bogaards
3,315 Pointspfff posted this:
let msg = firstName + " " + lastName + ":" + role.toUpperCase() + ".";
still a "Bummer" feedback. what am i doing wrong here?
Mauricio Hernandez
7,208 PointsHello, This is what worked for me, hope it helps. Blessings. https://imgur.com/a/NCotEG4
chr1stoph
4,128 PointsTadjiev is correct. The course doesn’t tell you but, you need to use the new syntax using the ` , $ and {} instead of single quotes. View his answer. Worked for me as well. Thanks Tadjiev!
Cirsten Kot
Full Stack JavaScript Techdegree Student 282 PointsTadjiev Codes tnx for the solution! After trying way to long ;)
Nicholas Prober
4,925 PointsThis is a huge reason why I think people quit this program. It seems like the quizzes don't align with what we just learned in the other videos which leads into a crapload of time wasted and major frustration. The hint is absolutely crap and confusing, Why would you name something "Shout" then not show the code which it refers to so that we can make sense of it and use the code in a similar fashion to answer this question directly. Instead here I am, confused as heck joining what looks like a lot of people frustrated over the exact same thing.
Volodymyr Rusnyk
9,657 PointsVolodymyr Rusnyk
9,657 PointsIs anybody know how to add UpperCase to role? I have tried all those methods and it doesn’t work I don't know why?