News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by lee on Friday July 03, 2015 @09:59AM (#9825605)
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.
Re:Airbnb JavaScript Style Guide by joshuacc on Friday July 03, 2015 @10:26AM (#9825752)
In ES6, that's no longer a problem since most HTML elements will involve interpolation with template strings and backticks.

    `<a href="${ site.url }">${ site.name }</a>`
Re:Airbnb JavaScript Style Guide by path411 on Monday July 06, 2015 @11:52AM (#9839986)

    "<a href='www.google.com'>Google</a>"
Will work as well though.