0

I am aware of the differences between "", '', and ``. But, which one is best / standard? My project right now has a mix of all the three but I would like to know, if a good coder was to review my project, which quotes would they wish to see?

mason
  • 30,041
  • 9
  • 73
  • 113
CiY3
  • 1
  • 2

1 Answers1

-6

You should NEVER use "" or ``. You should always use '', and concatenate strings instead of using ${} with the `. This is the standard. Never use the other two.

Saeed Zhiany
  • 2,003
  • 7
  • 28
  • 39
  • 9
    This answer really lacks reasoning. You say to never use double quotes or backticks, but don't explain why. You also specify something is the standard: but what standard is that? I just don't think this answer is helpful as is, it just appears to be throwing out some opinions without anything to substantiate it. – mason Jun 05 '22 at 00:11
  • If they should never be used, why are they part of the language? `\`` strings (template literals) were just recently added. Surely there was a reason for that? Maybe at least two good reasons? – Chris Jun 05 '22 at 02:21