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

Nicoleta Nastase
Nicoleta Nastase
4,913 Points

what am i doing wrong?

app.js
let firstName = 'Nico';
let lastName = 'Nastase';
let role = 'developer';
let shout = role.toUpperCase();
let msg = firstName  + ' ' + lastName + ':' +  shout + '.';

3 Answers

Hi Nico,

The issue here is that you are also concatenating a period.

Also, you could just add the toUpperCase method directly to the role variable inside the message string.

let firstName = 'Nico';
let lastName = 'Nastase';
let role = 'developer';
let msg = firstName  + ' ' + lastName + ': ' +  role.toUpperCase();

Kind regards, Berian

Nicoleta Nastase
Nicoleta Nastase
4,913 Points

Done! Thank you so much for your help

Nicoleta Nastase
Nicoleta Nastase
4,913 Points

I did that , what you’ve saying, and i get this message “ Make sure you’re concatenating ‘:’ to lastName and role.

let msg = firstName  + ' ' + lastName + ': ' +  role.toUpperCase();

Is there a space after the colon?