DEV Community

[Comment from a deleted post]
Collapse
 
alaindet profile image
Alain D'Ettorre • Edited

A simple rule of thumb most people use

  • Start with a single quote
  • If needed (ex.: interpolation, escaping, multi-line, tagged template literals) use backticks
  • Avoid double quotes in JavaScript and prefer backticks

That's because most strings are simple single-liners and do not need those features, for example import entry points, configurations etc. Also, if you're programming with a non-ANSI keyboard the single quote is cheap, while the backtick is a pain to type