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 trialkyle long
Front End Web Development Techdegree Student 2,678 Pointshaving trouble figuring this one out, it says, Finally, convert the string stored in role to uppercase letters.
Finally, convert the string stored in role to uppercase letters. The final msg string should look similar to this: "Carl
let firstName ="Kyle";
let lastName ="Long";
let role = 'developer'.toUppercase();
let msg = firstName + " " + lastName + ": " + role;
8 Answers
Rick Gleitz
47,876 PointsNo, the role.toUpperCase() should be down in the let msg part, not in the let role part. And remember: it's role.toUpperCase() not role.toUppercase(). Both the U and the C need to be capitals.
Rick Gleitz
47,876 PointsHi Kyle, The .toUpperCase() method gets attached to the role variable in your msg concatenation, not at the end of the variable declaration. Make sure that the 'c' in the method you have is a capital C.
Hope this helps.
kyle long
Front End Web Development Techdegree Student 2,678 Pointsthank you Rick!
kyle long
Front End Web Development Techdegree Student 2,678 Pointsso its role.toUppercase(); = 'developer'? how should i attach it to role?
Rick Gleitz
47,876 PointsYou're welcome.
sanjeshwari Nand
Full Stack JavaScript Techdegree Student 4,673 PointsHi Kyle,
You did everything correct except for not camel casing the method toUpperCase() as it should be. Below is how your code runs in the console when you want to see what msg is:
let firstName ="Kyle"; let lastName ="Long"; let role = 'developer'.toUpperCase(); let msg = firstName + " " + lastName + ": " + role; undefined msg "Kyle Long: DEVELOPER"
Rick Gleitz
47,876 PointsHi Mark,
With the hint, I think they were trying to show you another example of how to do .toUpperCase() or something like that. Don't worry about that.
But the error message did say not to modify the original string stored in role. The modification goes down in the let msg line. First of all, delete the concatenation of the period at the end of that line. It's outside the string the challenge wants. Next, put a space after the colon (so it will separate your name from the word developer). Finally, attach the .toUpperCase() method to the end of role in the concatenation rather than as you did up above where role was defined.
Hope this helps!
Mark Anderson
UX Design Techdegree Graduate 16,092 PointsI'm stuck on this problem. I attempted what read here ( though not entirely sure that I understood it.)
let firstName = "Mark"; let lastName = "Anderson"; let role = 'developer'.toUpperCase(); let msg = firstName + " " + lastName + ":" + role + ".";
received this message - Bummer: The original string stored in role
should not be modified.
The hint is- const word = "javascript";
// the value of 'shout' is "JAVASCRIPT" const shout = word.toUpperCase();
This is confusing to me because I don't grasp why the value shout is used. But this is closer to the video where he used a variable but he also used the console.log as well.
Mark Anderson
UX Design Techdegree Graduate 16,092 PointsRick,
Thank you for the tips. I was able to finish up the quiz. I have a slightly better understanding of the details now. Thank you!
Rick Gleitz
47,876 PointsYou're welcome.
Hannah Douglas
Full Stack JavaScript Techdegree Student 1,866 PointsThank you, Rick! I was also struggling with this question, but this helped me figure it out.
kyle long
Front End Web Development Techdegree Student 2,678 Pointskyle long
Front End Web Development Techdegree Student 2,678 Pointsooooooic, yeah i seee now. thank you so much