by nmjohn · 12y ago · 0 comments
The && though, I've never used in this context. And I'm not sure if I've seen it out in the wild or not. I knew what it did right away so I imagine if I have seen it before I wouldn't remember.
I use the || trick really often, but never the && one.
By the way, why not use a one-liner if instead?
if (condition) something;
I find more readable this way.
Also, for example I use a sublime plugin to automatically tidy my code, and that isn't an option in it, so I don't do it anymore.