'Operator precedence - how far do operands go?
Consider this code snippet:
true || false && false
&& usually has higher order precedence than || which turns this expression basically into
true || (false && false)
What I cannot wrap my head around is how do I determine what makes the left and right sides of the operator. Why is only false considered a left operand of the && operator, and not everything to the left from the && operator, i.e. true || false?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
