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
  • 31,774
  • 10
  • 77
  • 121
CiY3
  • 1
  • 3

1 Answers1

-7

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,051
  • 9
  • 30
  • 41
jo arans
  • 3
  • 1
  • 11
    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
  • 2
    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? – ChrisGPT was on strike Jun 05 '22 at 02:21