# Logical operators

Logical operators compare Boolean (`true` and `false`) values and return a third Boolean value. For example, if both operands evaluate to `true`, the logical AND operator (`&&`) returns `true`. If one or both of the operands evaluate to `true`, the logical OR operator (`||`) returns `true`. Logical operators are often used in conjunction with comparison operators to determine the condition of an `if` action. For example, in the following script, if both expressions are true, the `if` action will execute:

    if (i > 10 && _framesloaded > 50){
    	play();
    }

The following table lists the ActionScript logical operators:

Operator | Operation performed
`&&` | Logical AND
`||` | Logical OR
`!` | Logical NOT