4 ms·
It's just a matter of Douglas Crockford's taste and he doesn't like them so you have to live with it.
by Sephr 17y ago
It's just a matter of Douglas Crockford's taste and he doesn't like them so you have to live with it.
- tlrobinson 17y agoAlong with increment/decrement operators, fall-through cases in switch statements, foo['bar'] style property access/assignment, bitwise operators, and a number of other things. His book ("JavaScript: The Good Parts") contains a lot of good information, but roughly half is what I would consider "style" preferences.
- adamc 17y agoTo be fair, he gives a very clear explanation of how he came to his opinion on case statements -- he started out favoring them. So it's more "opinion informed by experience" than just "opinion".