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

the error message keeps saying i am hitting a null... i need to add the method to uppercase and come out w/ the message

i cannot seem to stumble upon the right answer i have tried doing all this in order and the error says null something...

app.js
let firstName = 'Carlos';
let lastName = 'Salgado';
let role = 'developer';
let msg = firstName + ' ' + lastName +':/' + role; 
console.log("Carlos Salgado: developer");
let role = "developer";
role.toUpperCase();
console.log("DEVELOPER");
let msg = Carlos Salgado: + let role;
console.log ("Carlos Salgado: DEVELOPER");
let msg= "Carlos Salgado: DEVELOPER";

2 Answers

Steven Parker
Steven Parker
231,236 Points

:bookmark: Hi, I got tagged by "ask to answer". For Task 2, your code might look like this:

let firstName = 'Christine';                         // task 1 said use your own name
let lastName = 'Marshall';
let role = 'developer';
let msg = firstName + ' ' + lastName + ': ' + role;  // needed a space instead of '/'

Then for task 3, the instructions say to "convert the string", so instead of adding more code, you will just change the last line so that it upper-cases the "role". You will still use variables instead of fixed strings:

let msg = firstName + ' ' + lastName + ': ' + role.toUpperCase();  // small change to last line only

And you don't need to log anything for this challenge.

Hi Steven, I want to thank you from the bottom of my heart for responding and helping me so quickly and effectively i am really having a hard time and your answers are thorough and make sense and help a great deal... I just want you to know that i appreciate your time and effort! Sincerely, Christine Marshall