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

ToJuana N
ToJuana N
1,752 Points

toUpperCase

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

What is wrong with this code. I keep getting

app.js
let firstName = 'ToJuana';
let lastName = 'Newsome';
let role = 'developer';

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

Also another thing you are doing wrong is that you need to add a space after :, so something like ": " should work!

2 Answers

Hi, the only thing you are doing wrong is that you added a dot at the end and you do not need one, so just remove it and you should be fine! If that helped, please mark as best answer to indicates other student your issue is resolved! Happy Coding!

ToJuana N
ToJuana N
1,752 Points

I still keep getting this error(Bummer: Cannot read property '1' of nul)

Add below statement under your code to get required output in console:- console.log(msg);