3 ms·
I think the idea is that if you use single quotes for strings, you don't have to escape the double quotes that are often found in html. '<p id="foo">something</
by fuzionmonkey 15y ago
I think the idea is that if you use single quotes for strings, you don't have to escape the double quotes that are often found in html. '<p id="foo">something</p>'
But the same goes for something like "you can't do that"
I guess it just depends what you don't want to escape. For Google, the more probable scenario was probably the former.
- julian37 15y agoThe former isn't a very good reason: HTML/XML accept both double and single quotes, so "<p id='foo'>something</p>" would work equally well.
- joshontheweb 15y agoyes, but it is much more common for double quotes to be used in html