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 trial

JavaScript JavaScript Basics Working with Strings Combine and Manipulate Strings

Bummer: Make sure you're adding one space (' ') between `firstName` and `lastName`.

app.js
let firstName = 'JP';
let lastName = 'Castrillon';
let role = 'developer';
let msg = `firstName`  +  `lastName` + `role`;

2 Answers

Hi. When you adding space like this: let msg = 'firstName' + 'lastName' + 'role'; Is wrong because no space inside of string like this 'firstName '. Also you using a Template Literal symbol. So the good answer will be:

let msg = 'firstName ' + 'lastName ' + 'role'; :)

Brett Steger
Brett Steger
4,267 Points

Hello! I'm new to coding and definitely feel out of place answering a question but I'm pretty sure I know the answer.

you have to add a space somewhere after 'firstName' before 'lastName' and another between 'lastName' and 'role' (ex: 'firstName' + ' ' + 'lastName' + ' ' + 'role') I believe you can also write it as: 'firstName ' + lastName ' + 'role'

this way when you display the entire 'msg' you will have spaces and be able to read it properly. pretty sure you are near the template literals course, that is another way to write it, I prefer it.