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 trialRaissa Gomes
3,486 PointsHI, this is the message of error that I'm getting Make sure you're adding one space (' ') between `firstName`
let msg = firstName
+ lastName
+ role
; and this is my code, can someone help me figure it out what I'm doing wrong
let firstName = 'Raissa';
let lastName = 'Gomes';
let role = 'developer';
let msg = `firstName` + `lastName` + `role`;
2 Answers
Steven Parker
231,269 PointsAs the error says, you need to add a space between the names. But even more important is that variable names should not be enclosed in quotes. Extra characters you add (like the space) will have quotes.
Shem Ogweno
15,393 PointsSince you are using Template literals, then you should add --> ${ } to perform substitutions
let firstName = 'Raissa';
let lastName = 'Gomes';
let role = 'developer';
let msg = `${firstName} ${lastName}: ${role}`;