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 trialTSENG FUCHUN
4,287 PointsWhat is this syntax? I don't know about this...please help
What is the javascript ${username}
means?
And why these strings use the ` this mark ?
const message = `${username} has ${badgeCount} total badge(s) and ${points} points in Javascript.`
Anyone could help?
1 Answer
Louise St. Germain
19,424 PointsHello Tseng,
Those back ticks indicate a template literal, where it fills in anything inside the ${ ... } with the value of the variable that is referenced inside.
You can find out more here in a video: https://teamtreehouse.com/library/basic-and-multiple-line-strings-2. It might be easier for you to watch that (and the next one after it too) than for me to try to explain it all.
I hope this will help explain them!
TSENG FUCHUN
4,287 PointsTSENG FUCHUN
4,287 PointsI will watch the video you suggested. And the video is really clear. Louise St. Germain Thank you !