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

Carlos Salgado: .toUpperCase() task 3.

Hey guys, I have gone over this and can't past this task. This is what I have and keep coming back to. Any hints?

app.js
let firstName = 'Jeremy';
let lastName = 'Curtin';
let role = 'developer';

let msg = firstName +" "+lastName +":"+ role.toUpperCase+".";

1 Answer

Nicole Antonino
Nicole Antonino
12,834 Points

Hey so I just removed the "." you had at the end of the string, since that's not what was strictly required (The tests can be very picky sometimes). Also you forgot to add () at the end of toUpperCase, which might have been the main cause of your problems:

let firstName = 'Jeremy';
let lastName = 'Curtin';
let role = 'developer';

let msg = firstName + " " + lastName + ": " + role.toUpperCase();
BRADLEY KINNEY
BRADLEY KINNEY
Courses Plus Student 3,115 Points

What Nicole said...also you forgot to add a space after your colon ": ". These automated tests are pretty particular.

Thanks Nicole!