You describe early termination - this means that the second statement is executed only if the answer is not yet known, but it does not change the result (if you do not execute the expression in the second expression).
So a == 10 || b == 10 a == 10 || b == 10 will lead to something where a, or b is equal to 10, or where a and b are equal to 10. Or, more precisely, ...
a = 10 b = 10
or
a = 10 b = 0
or
a = 0 b = 10
If a turns out to be 10, you really don't need to check b - but some languages ββstill do.
source share