3 ms·
The sane argument is about avoiding escaping of nested quote characters. It's easier to use double quotes if your text is english (or other language that uses
by ergothus 8y ago
The sane argument is about avoiding escaping of nested quote characters.
It's easier to use double quotes if your text is english (or other language that uses apostrophes).
It's easier to use single quotes if your text is HTML (for double quotes)
I've seen an argument to use template literals (backticks) almost everywhere. I don't know if that involves any real performance hit, but I've also not adopted this convention, at least not yet.
- metamet 8y agoTemplate literals also have the benefit of being able to embed variables without concating the string, ie: `My name is ${name}.`