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

const firstName = 'first name'; const lastName = 'last name'; const role = 'developer'; const msg = (firstName + " " +

What is wrong with code

app.js
const firstName = 'first name';
const lastName = 'last name';
const role = 'developer';

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

you're re-declaring a const - msg and also reassigning a value to it. You cant do that. A const variable should be constant, never changing.

1 Answer

Hey Tina,

You can't re-declare a const variable.

Try creating a new variable which has the value of the role variable but in uppercase and placing this new variable into the msg variable.

You'll need to create this variable before the msg variable.

Let me know if that makes sense or if you're still having trouble.