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

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 28,720 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.