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 trialAlexis Leavell
1,907 Pointsproperly combine variables to make a string
let firstName = "Carlos";
let lastName = "Salgado";
let role = 'developer';
let msg = firstName+' '+lastName +' '+role' .';
2 Answers
Kieran Shepherd
6,415 PointsYou don't need quotes - let msg = firstName+lastName+role+".";
There are not strings just variables apart from the ".".
Ian Cahn
7,245 PointsHey Alex, you got very close.
Just check for the : in the completed sentence.
Here is my solution:
let firstName = 'Ian'; let lastName = 'Cahn'; let role = 'developer'; let msg = firstName + " " + lastName + ": " + role;