Like the rest of the operators in programming, the operators
|| have a priority, as in the case
&& is with higher priority than
||. The operator
() serves for changing the priority of operators and is being calculated first, just like in mathematics. Using parentheses also gives the code better readability and is considered a good practice.