What does ${} (dollar sign and curly braces) mean in a string in JavaScript?

I haven’t seen anything here or on MDN. I’m sure I’m just missing something. There’s got to be some documentation on this somewhere?

Functionally, it looks like it allows you to nest a variable inside a string without doing concatenation using the + operator. I’m looking for documentation on this feature.

Example:

var string = 'this is a string';

console.log(`Insert a string here: ${string}`);

5 Answers
5

Leave a Comment