Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
clintonc
on July 3, 2015
|
parent
|
context
|
favorite
| on:
Airbnb JavaScript Style Guide
My rationale for single quotes is also that JSON chose for you -- if you have JSON-formatted strings in your javascript and you use single quotes for your strings, you don't have to escape the double quotes.
joepie91_
on July 3, 2015
|
next
[–]
I'd find it very worrying that you have JSON-formatted strings in JS code. Why would you do that, when there's also a native representation?
phpnode
on July 3, 2015
|
prev
[–]
Do you do that more or less frequently than writing strings with apostrophes?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: