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 trialJavi Caballero
7,422 PointsBelow role, create a new variable named msg that combines the firstName, lastName and role variables to create a string
I can't seem to figure out why this is wrong. Ik it is something, but I can't find it.
let firstName = 'Javi';
let lastName = 'Caballero';
let role = 'developer';
let msg = firstName + " Javier " + lastName + "Caballero: developer" + role;
1 Answer
Steven Parker
231,236 PointsWhat this code currently puts into msg
is: "Javi Javier CaballeroCaballero: developerdeveloper".
You will only need to use literal strings for spaces and/or punctuation. Your names and the role are filled in by the variables.
Javi Caballero
7,422 PointsJavi Caballero
7,422 PointsThanks! And wow, you answer a lot of questions lol... wait... BRO 215,000 POINTS THATS CRAZY
Steven Parker
231,236 PointsSteven Parker
231,236 PointsAbout half of those points are from answering forum questions.