News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by _jnc on Friday July 03, 2015 @01:16AM (#9823643)
At least in Ruby, you can only do string interpolation with strings in double quotes.
Re:Airbnb JavaScript Style Guide by elisee on Friday July 03, 2015 @01:18AM (#9823654)
JavaScript up to ES5 doesn't support string interpolation at all. ES6 introduces backticks `before${var}after` for that, but there's still no functional difference between single and double quotes.
Re:Airbnb JavaScript Style Guide by mixmastamyk on Friday July 03, 2015 @03:49AM (#9824145)
Interesting they chose that, considering it's deprecated in bash and python.
Re:Airbnb JavaScript Style Guide by sprobertson on Friday July 03, 2015 @01:35AM (#9823707)
Coffeescript as well. I try to use single quotes whenever possible, so if a string is templated it stands out a bit with the double quotes.