0

I like using backticks for strings in javascript so that I can avoid the need for escaping quotes.

For example, instead of writing:

const s = "Anna's T-shirt says \"hello\"";

or:

const s = 'Anna\'s T-Shirt says "hello"';

I can use template strings to write:

const s = `Anna's T-shirt says "hello"`;

Is there any disadvantage to using template strings in this way? Is there a performance cost or something else negative?

Brad Johnson
  • 1,776
  • 1
  • 20
  • 26

0 Answers0