-2

I have problem with template strings. I created a variable, but i can't put it in string

let suffix = "-dev";
alert("hello, ${suffix}");
Razvie-arr
  • 39
  • 4

1 Answers1

3

To use template strings you have to use backticks ( `` ).

let suffix = "-dev";
alert(`hello, ${suffix}`);
sonEtLumiere
  • 4,461
  • 3
  • 8
  • 35