
Using && and || outside of if-clause in JavaScript - bytearcher
http://bytearcher.com/articles/using-and-and-or-outside-of-if-clause/
======
nperez
There's a part of me that likes this style because it's compact, but I've
learned to avoid relying on others understanding shorthand. The rule of thumb
I go by right now is that if I can make my code read more like English, that
is the style I will prefer.

To a junior developer, "if (typeof request.session !== 'undefined') {var
sessionId = request.session.id;}" is going to be more readable. It's hard to
mistake the intention.

Most people in this industry speak English. It's easier to take advantage of
that than to rely on your peers understanding &&||@(#*$((())) or whatever.

..unless you're taking part in an obfuscated code contest, in which case you
should use these techniques as a basic building block.

