2 ms·
At the risk of starting a style debate, this may be easier to read if you write it like an if-else: a > max ? max : a < min ? min : a
by sarah180 6y ago
At the risk of starting a style debate, this may be easier to read if you write it like an if-else:
a > max ? max :
a < min ? min :
a
- KMag 6y agoUnless, of course, your language "designer" has no idea why every other language uses right-associative ternary operators.
- bangonkeyboard 6y agoThis was a "fun" bug to track down in a PHP codebase.