There are two if statements below that have multiple conditions using logical operators. Logically both are same but the order of check differs. The first one works and the
The conditional-AND operator (&&) performs a logical-AND of its bool operands, but only evaluates its second operand if necessary.