Logical Operators
Last updated
Last updated
Logical operators are typically used with Boolean (logical) values. When they are, they return a Boolean value. However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value.
Description The logical operators are described in the following table from the Javascript Language Reference at Mozilla.org: