Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics Working with Strings Combine and Manipulate Strings

Unable to complete

The variable msg = 'firstName ' + 'lastName: '; - using the check work button, it states the spaces are non existent.

app.js
let firstName = 'Melbron';
let lastName = 'Gardner';
let role = 'developer';
var msg = 'firstName ' + 'lastName: ';

I've also tried the following but it does not seem to accept -

let firstName = 'Melbron'; let lastName = 'Gardner'; let role = 'developer'; var msg = 'firstName ' + '' + 'lastName: ' ;

2 Answers

Jeff Muday
MOD
Jeff Muday
Treehouse Moderator 26,897 Points

You are so close!

The last line would need to be modified and you will be golden with part 2 of the challenge.

let firstName = 'Melbron';
let lastName = 'Gardner';
let role = 'developer';
var msg = firstName + '  ' + lastName ': ' + role;

The last part of the challenge is up to the student complete. Good luck with your JavaScript journey!

Thank you!

Please mark this as closed.