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 trialja5on
10,338 Pointscombine and manipulate strings JavaScript Basics
I dont understand any part of it at all, i deleted a large part of my code, can anyone please do a step by step approach the videos i've gone back over and over and still nothing
let firstName = "FirstName";
let lastName = "LastName";
let firstName = " Carlos"; let lastName = "Salgado"; let role = " developer"; let msg = firstName + " " + lastName ': ' + role;
1 Answer
Heidi Fryzell
Front End Web Development Treehouse Moderator 25,178 PointsHello Jason,
I think you have an extra space between the quotation mark and the first letter of "Carlos" and "developer" when you are assigning the firstName and role variables..
let firstName = " Carlos";
let lastName = "Salgado";
let role = " developer";
let msg = firstName + " " + lastName ': ' + role;
It also looks like you are mixing the single quotes and double quotes in the message.
When I made these corrections to your code I was able to complete that task successfully.
let firstName = "Carlos";
let lastName = "Salgado";
let role = "developer";
let msg = firstName + " " + lastName + ": " + role;
Happy coding!
Hope this helps. Heidi