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

challenge 3

I don't see whats wrong with my code

app.js
let firstName = ("Nathalie");
let lastName = ("Larsson");
let role = 'developer';
var msg = firstName + " " + lastName + ":" + role.toUpperCase  + ".";

2 Answers

For the method .toUpperCase() to work, you'll need to add the parenthesis to the end of it.

Tried that and it still donsnt work

Ah, it says to pay close attention to the spacing. There needs to be a space after the colon.

Also, the period at the end isn't part of the request, so remove it. I just attempted the the challenge with the period on there and it wouldn't accept the answer as correct.

So the question before this one I struggled with as well because I didn't add the period in the end and then when I did it work, but in this one iv'e tried both with and without and can't get it to work. In the question before everything was fine and i was only suppose to add so that developer was upper case in this one.