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 trialAdrian Storr
2,660 Pointsthis looks good but im missing something, can anyone help?
let firstName = "Adrian";
let lastName = "Storr";
let role = 'developer';
const msg = firstName + lastName + 'developer' + '.';
4 Answers
Simon Coates
8,481 PointsYou're missing the semi-colon and it doesn't require the "." at the end. It probably wants you to consume the role variable in the concatenation operator (+role).
Robert Gulley
Front End Web Development Techdegree Student 10,722 PointsHi Adrian! -
You're wanting your string to say: "Adrian Storr: developer". It's important to remember spacing when using the + in concatenation.
If you code:
const msg = firstName + lastName;
you are going to get: "AdrianStorr" as a result. To fix this, we need to add several + to the above code.
const msg = firstName + " " + lastName + ": " + role;
... should do the trick for you.
Yobani Cruz
8,868 Pointshow do i uppercase developer??
can i get help here plz!
Simon Coates
8,481 Pointsit accepts:
let firstName = "Name";
let lastName = "Von LastName";
let role = 'developer';
let msg = `${firstName} ${lastName}: ${role.toUpperCase()}`;
but you could achieve a similar result for the msg using string concatenation (if they haven't covered the backtick syntax and string interpolation). So the last line in that instance might resemble:
let msg = firstName+ " "+lastName + ": "+role.toUpperCase();
Yobani Cruz
8,868 Pointshow im i still getting it wrong it says : Bummer: Cannot read property '1' of null.