3 ms·
The rationale I have for using single quotes over double quotes in javascript is that when embedding HTML elements, attributes are often quoted in double quotes
by lee 11y ago
The rationale I have for using single quotes over double quotes in javascript is that when embedding HTML elements, attributes are often quoted in double quotes.
So it's much nicer to write
'<a href="www.google.com">Google</a>'
than to constantly escape argument strings.