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 trialMacKenzie Santiago
5,137 Pointslet msg = firstName + " " + lastName +":" + role.toUpperCase() + ".";
I give up! WUTS Wrong?!
let firstName = "MacKenzie";
let lastName = "Santiago";
let role = 'developer';
let msg = firstName + " " + lastName +":" + role.toUpperCase() + ".";
4 Answers
Jennifer Nordell
Treehouse TeacherHi there, MacKenzie Santiago! You're doing fantastic and you are incredibly close. No reason to give up.
If I were to run this and use console.log(msg);
to print the string, I would get back:
'MacKenzie Santiago:DEVELOPER.'
But it's looking for:
'MacKenzie Santiago: DEVELOPER'
Note that the second one has a space after the colon and no period/full stop on the end. So instead of using just a colon without a space after ":"
try a ": "
and put the extra space needed directly in that string. Then on the end, remove the + "."
.
Hope this helps!
psycholinguist
Front End Web Development Techdegree Student 4,751 PointsHi, Why don't you pass it with the new ES6 syntax template literal syntax? It worked perfectly for me.
let msg = `${firstName} ${lastName}: ${role.toUpperCase()}`;
MacKenzie Santiago
5,137 PointsIm sure you are correct but it wasnt part of the lesson plan for this assignment, like it is for the next assignment.
psycholinguist
Front End Web Development Techdegree Student 4,751 PointsOr, Do as the lady explained above.
let firstName = "MacKenzie";
let lastName = "Santiago";
let role = 'developer';
let msg = firstName + " " + lastName + ": " + role.toUpperCase();
It worked perfectly as well. :D
MacKenzie Santiago
5,137 Pointsok sorry it passed...........I forgot to take away the "." at the end
MacKenzie Santiago
5,137 PointsMacKenzie Santiago
5,137 PointsAwww......They threw a knuckle ball in there! Thank you!
MacKenzie Santiago
5,137 PointsMacKenzie Santiago
5,137 PointsI did what you asked me to do EXACTLY. It still did not pass.............