2

Today I stumbled across some JavaScript code that I've never seen before. The format appears to be something like:

something`Hello ${world}`;

Now I know what the `` quotes do, and I am familiar with the new ES6 ${variable} syntax. But it doesn't look like anything I've seen before, and I don't understand how this doesn't generate an error. What is "something" and how / why does this even work?

Repsi
  • 21
  • 6

0 Answers0