40 ms·
The two behaviors don't seem very related. In `if a == b == c`, the value of `b` is evaluated only once, even if `b` is in fact a bigger/side-effecting express
by masak 5y ago
The two behaviors don't seem very related.
In `if a == b == c`, the value of `b` is evaluated only once, even if `b` is in fact a bigger/side-effecting expression, and `c` might not be evaluated at all.
In `a = b = c`, the `c` is evaluated first, and then `a` and `b` are assigned to, left-to-right.