0

In this string

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

what do $ and ` mean?

wazz
  • 4,057
  • 5
  • 18
  • 32
Алекс
  • 17
  • 6

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
  • 5,589
  • 3
  • 27
  • 34