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

Also two space brackets are standard for Idiomatic JS and AibBnB Style Guide. jQuery uses four but that's because of age.


Isn't that mostly an artifact of deeply nested callbacks? With promises, generators, and what not I've been seeing a lot of new Javascript going back to 4. Is there a pragmatic reason for 2 going forward? I realize it's mostly trivial but I have a much easier time visually parsing 4 vs 2. I also sort've appreciate that it pressures me to reduce indentation.




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

Search: