There is no
or both since OR short-circuits on True. Only one condition needs to be true and the other is ignored.
true || true => only the first operand is evaluated
true || false => likewise
false || true => only now is the second operand examined
All above are true.
It is not enough to just know what AND, OR, NOT mean. We must be aware of operator precedence, similar to order of operations in maths.
The above expression contains, brackets, comparisons, and logic which also has precedence, NOT, AND, OR in that order when there are no brackets.
!( 1 < 8 && (5 > 2 || 3 < 5));
Inner brackets take precedence, and then comparison comes next.
5 > 2 || 3 < 5 sort-circuits on
5 > 2.
3 < 5 is not evaluated. Rewriting gives,
! ( 1 < 8 && true )
Again, comparison takes precedence, so
1 < 8 is evaluated, yielding
! (true && true)
which we know is
! true, or