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

Java

help with a task please

let firstName = 'Carlos'; let lastName = 'Salgado'; const role = 'developer' ; const msg = firstName + ' ' + lastName + ': ' + role; ('developer'word.toUpperCase() );

what shell i do to make developer all in uppercases?

Matt DADDY
Matt DADDY
2,890 Points

Hey there,

I think you meant to post in JavaScript not Java :)

However a few things,

const msg = firstName + ' ' + lastName + ': ' + role

You may want to add a space in the '' between first and last name.

To get developer to uppercase you'll reference the variable role and use the toUpperCase() method.

role.toUpperCase()

Complete Example:

const firstName = 'Carlos'
const lastName = 'Salgado'
const role = 'developer'
const msg = firstName + '  ' + lastName + ': ' + role.toUpperCase()

You'll also learn some fancy new string concatenation in the future which will make things easier. :)

1 Answer

thx!