< Previous | Contents | Next >
So far you’ve seen pretty simple expressions evaluated for their truth or falsity. However, you can combine simpler expressions with logical operators to create more complex expressions. Table 2.2 lists the logical operators.
Table 2.2 | Logical Operators | |
Operator | Description | Sample Expression |
! | Logical NOT | !expression |
&& | Logical AND | expression1 && expression2 |
|| | Logical OR | expression1 || expression2 |