Re:Show HN: Learn and practice modern JavaScript
by ergothus on Thursday January 03, 2019 @11:23AM
(#18816256)
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.
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.