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 trialpaul kavuma
5,427 PointsHey, am not sure what is wrong with this code. Am to add the uppercase to role. Does anybody know what am doing wrong?
let firstName='Paul';
let lastName='Kavuma';
let role = 'developer';
let msg = firstName + ' ' + lastName + ' ' + ':' + role.toUpperCase() + '.';
1 Answer
Mark Ryan
Python Web Development Techdegree Graduate 28,648 PointsHi, Paul!
You're close! You'll want your output to look exactly like this:
Paul Kavuma: DEVELOPER
There should be 2 spaces and 0 periods. Check back if that doesn't help!
paul kavuma
5,427 Pointspaul kavuma
5,427 PointsThank you very much, it worked.
Angelica Islas
4,082 PointsAngelica Islas
4,082 PointsI am stuck with the same problem. I wrote: let msg= firstName + ' ' + lastName: ' ' +role.toUppercase(); Would you be able to help me, Mark Ryan? Thanks.
Mark Ryan
Python Web Development Techdegree Graduate 28,648 PointsMark Ryan
Python Web Development Techdegree Graduate 28,648 PointsHi, Angelica!
Of course I can help!
You're referencing
lastName:
which has a colon on the end resulting in unexpected token. Also,toUppercase()
is not a String method, you'll need to usetoUpperCase()
.Your code:
let msg= firstName + ' ' + lastName: ' ' +role.toUppercase();
Try doing:
let msg = firstName + ' ' + lastName + ': ' + role.toUpperCase();
Angelica Islas
4,082 PointsAngelica Islas
4,082 PointsThanks for your help, Mark Ryan!