Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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?


Do you do that more or less frequently than writing strings with apostrophes?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: