News for hackers. Stuff that matters.
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.

Re:Show HN: Learn and practice modern JavaScript by metamet on Thursday January 03, 2019 @11:47AM (#18816505)
Template literals also have the benefit of being able to embed variables without concating the string, ie: `My name is ${name}.`