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

nathanielcusano
9,808 PointsWhat if I wanted to put another variable between the backticks that contained a string, would I have no choice but to...
use a + to insert the variable?

nathanielcusano
9,808 Pointsthanks Osama answered it

Joel Kraft
Treehouse Guest TeacherGreat! I changed his comment to an answer and marked it as accepted. Thanks!
2 Answers

Osama Awan
Courses Plus Student 8,676 Pointsyou can do for Example: My name is ${your variable name} and i'm from ${your variable name}

Tom Geraghty
24,174 PointsThe answer wasn't explicit, but the MDN makes it clear that the syntax Osama used is required (including the dollar sign and curly braces).
From the MDN on Template Literals
`string text`
`string text line 1
string text line 2`
`string text ${expression} string text`
tag `string text ${expression} string text`
And
Template literals can contain place holders. These are indicated by the Dollar sign and curly braces (${expression}).
Joel Kraft
Treehouse Guest TeacherJoel Kraft
Treehouse Guest TeacherHi nathanielcusano,
Did Osama answer your question? Or do you still need help? If you still have questions, please provide a bit of code demonstrating your question, and I will try to help clarify.
Thanks, Joel