0

In this string

${string.toDateString()} - ${string2.toDateString()}

what do $ and ` mean?

wazz
  • 4,953
  • 5
  • 20
  • 34
Алекс
  • 25
  • 1
  • 8

1 Answers1

0

These are called Template Literals in Javascript.

A Template Literal is enclosed in back-ticks instead of single quotes or double quotes. The ${} notation allows you to embed the string value of an enclosed variable or expression.

Read additional information about Javascript Template Literals here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

Arash Motamedi
  • 9,284
  • 5
  • 34
  • 43