> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs1334/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs1334/javascript_syntax/logical_operators.md).

# Logical Operators

[See Javascript Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Short-Circuit_Evaluation)

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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators#Short-Circuit_Evaluation):

![](https://github.com/kdoore/cs1334/tree/6cd3c02471b65bccb609a625a0022506a77fe19f/Screenshot%202016-10-26%2008.35.18.png)
