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

Rees Mortensen
Rees Mortensen
12,956 Points

Explaining what i've done wrong

Is there something that is able to help me understand what i've done wrong or explain the correct answer to something? I am getting question wrong and it's not telling me why and what is correct.

app.js
let firstName = 'Rees';
let lastName = 'Mortensen';
let role = 'developer';

let name = firstName +' ' lastName + '.' + role;

1 Answer

Hey Rees Mortensen,

Currently, this is what I get when I log your name variable: Rees Mortensen.developer

In your second challenge, you should create a variable name msg. Also, after firstName you have missed + sign and after lastName you should replace . with :

Your code for second challenge should look like this:

let firstName = 'Rees';
let lastName = 'Mortensen';
let role = 'developer';

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

Hope this helps!