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 trialgabriel Pereira
3,203 PointsFinally, convert the string stored in role to uppercase letters. The final msg string should
let firstName = 'Gabriel';
let lastName = 'Pereira';
let role = 'developer';
let msg = 'firstName' + ' ' + 'lastName' : 'role.toUppercase';
1 Answer
cazepeda
6,099 PointsYou missed the capital C
in Case
. Also the partentheses, ()
. Below is two ways to do it. Also remember that putting. the variables in regular quote marks ' '
will output it as a string and not what you assigned the value to be of the variable. Use template literals for to enclose variables.
e.g. 1.
let firstName = 'Gabriel';
let lastName = 'Pereira';
let role = 'developer';
let msg = firstName + ' ' + lastName + ' : ' + role.toUpperCase();
msg;
e.g. 2.
let firstName = 'Gabriel';
let lastName = 'Pereira';
let role = 'developer';
let msg = `${firstName}` + ' ' + `${lastName}` + ' : ' + `${role}`.toUpperCase();
msg;