Operators

and

Supported By

Syntax

expression and expression

Both expressions yield booleans.

Description

The and operator evaluates to the logical AND of the given boolean values. Both values must be true for the expression to evaluate to true. If either value is false, the expression will evaluate to false.

Note

The and operator is not short-circuited. Both expressions will be evaluated to determine the truth value of the whole expression. (This has considerable implications if either expression calls a function that has side-effects. For a short-circuited version of the and operator, use the &&& operator.)

See Also

or