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 trialXander gomez
2,313 Pointsmy 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
jb30
44,806 PointsHave you tried adding parentheses after toUpperCase
such as firstName.toUpperCase()
?
Xander gomez
2,313 Pointsyes i did that right after and added parenthesis around my alert tag , THANKS !
Justyn Phearson
2,886 PointsForgot the + ' ' + in between the firstNam and lastName.toUpperCase.