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

JavaScript The Solution

my template literal variable wont show in my prompt . help pleaase?

im trying to use template literals instead but my only thing showing are my strings and not my variables

const firstName = prompt("What is your first name.");

const lastName = prompt("What is your last name");

const completeName = ${firstName.toUpperCase} ${lastName.toUpperCase};

const characterCount = completeName.length;

alertthe string ${completeName} is ${characterCount} long;

3 Answers

Have you tried adding parentheses after toUpperCase such as firstName.toUpperCase()?

yes i did that right after and added parenthesis around my alert tag , THANKS !

Justyn Phearson
Justyn Phearson
2,886 Points

Forgot the + ' ' + in between the firstNam and lastName.toUpperCase.