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

Arya Patel
seal-mask
.a{fill-rule:evenodd;}techdegree
Arya Patel
Front End Web Development Techdegree Student 6,839 Points

Finally, convert the string stored in role to uppercase letters. The final msg string should look similar to this: "Carl

Hello there , I dont think I am wrong because I tried this on workspace and it works perfectly over there. Help? Thanks.

app.js
let firstName='Arya';
let lastName='Patel';
let role = 'developer';
let msg = firstName + ' ' + lastName + ':'+role.toUpperCase()+".";

2 Answers

Steven Parker
Steven Parker
231,269 Points

Testing in a workspace can only reveal syntax errors, but a challenge must also produce a specific result .

The instructions said: The final msg string should look similar to this: "Carlos Salgado: DEVELOPER" — note that there should be a space after the colon, and no period at the end.

GERARDO PEÑA
GERARDO PEÑA
379 Points

Im writing my code as it is

let firstName = "Jerry"; let lastName = "Pena"; let role = 'developer';

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

console.log(msg);

for some reason it's incorrect, I have written the same code on the workspace and checked the result in the console, and the results print as they must = Jerry Pena: DEVELOPER.

Cant recognize the mistake.

Steven Parker
Steven Parker
231,269 Points

For future issues, always start a new question instead of adding one as an "answer" to someone else's.

But in this case, the issue is that the challenge did not ask for a period to be added after the role.