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 trialRhonda Goolsby
6,992 PointsWhy doesn't this work? const msg = firstName + " " lastName + ":" role.toUpperCase() + ".";
I do not know why this is not working. Any ideas out there?
let firstName = 'Rhonda';
let lastName = 'Goolsby';
let role = 'developer';
const msg = firstName + " " + lastName + ":" + role.toUpperCase() + ".";
6 Answers
Rhonda Goolsby
6,992 PointsThanks Jun Jie Tai, that was it! Great attention to detail:)
Tai Jun Jie
Full Stack JavaScript Techdegree Graduate 23,907 PointsMay I know what is the output that you are expecting? I've tried your code and the output I got was Rhonda Goolsby:DEVELOPER.
Rhonda Goolsby
6,992 PointsRhonda Goolsby:DEVELOPER is the expected outcome, but the javaScript basics test question says it is not correct and that I need to add .toUpperCase.
Tai Jun Jie
Full Stack JavaScript Techdegree Graduate 23,907 PointsYou do not need to include the last "." at the end of your code
const msg = firstName +" " + lastName +": " + role.toUpperCase();
This should suffice
Tai Jun Jie
Full Stack JavaScript Techdegree Graduate 23,907 PointsAnd also make sure there is a space after the colon. Happy coding.
Rhonda Goolsby
6,992 PointsThank you Jun JIe Tai, I will give that a try and let you know what happens.
Tai Jun Jie
Full Stack JavaScript Techdegree Graduate 23,907 PointsAlright no problem.
Rhonda Goolsby
6,992 PointsRhonda Goolsby
6,992 PointsI console.log the output and it returns: Rhonda Goolsby: DEVELOPER
I want to keep moving through the course. Please help.