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 trialAlexandra Velez
Front End Web Development Techdegree Student 9,313 PointsWhy isn't the uppercase applying to role?
Not sure what the variable should be for the final step where const and toUpperCase apply to the role
let firstName = "Alexandra";
let lastName = "Velez";
let role = 'developer';
var msg = firstName + " " + lastName + ":" + " " + role;
const final = role.toUpperCase();
2 Answers
Rick Rana
10,285 PointsHey Alexandra,
In the challenge, you are not asked to create a new variable and then change 'const role' to upper case. You can just add the toUpperCase to 'role' in the msg variable...
let msg = firstName + " " + lastName + ": " + role.toUpperCase();
Hope this clears things up a bit. :)
Alexandra Velez
Front End Web Development Techdegree Student 9,313 PointsThank you for steering me in the right direction. I updated it from let to var, and it worked :D
Alexandra Velez
Front End Web Development Techdegree Student 9,313 PointsAlexandra Velez
Front End Web Development Techdegree Student 9,313 PointsThank you for clarifying a simpler way to complete the task. It's definitely easier to append the method to the variable.