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 trialRicky Redman
7,520 Pointsconverting variable role to uppercase
Hi! this looks like it should be correct, what am I not able to see. Trying to convert the value of role to uppercase
const firstName= 'Ricky';
const lastName= 'Redman';
const role = 'developer';
let msg= firstName + ' ' + lastName + ': ' + role;
const shout = role.toUpperCase();
1 Answer
Tom Phillips
897 PointsThis is because in msg you're calling the variable "role" but it should be "shout". Do this:
const firstName = 'Ricky';
const lastName= 'Redman';
const role = 'developer';
const shout = role.toUpperCase();
let msg = firstName + ' ' + lastName + ': ' + shout;
console.log(msg)