4 ms·
I second that. 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
by talles 12y ago
I second that.
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.
- nmjohn 12y agoIt is definitely more readable. Best practices would say always to use curly braces though. I go back and forth on my opinion of that. 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.