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

> The comma in its typical uses in variable assignment is pretty useless IMO.

I've screwed myself over a few times by getting into the habit of using the comma in this fashion. If you accidentally make that comma a semicolon, y in your example becomes global. My jQuery plugins all include a default settings object, and they happen to have the same name of "settings". Consequently, default settings for some plugins were being overridden and I had no idea why - until I found that I used a semicolon instead of a comma.



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

Search: