The logical AND (&&
) (logical conjunction) operator for a set of boolean operands will be true
if and only if all the operands are true
. Otherwise it will be false
.
More generally, the operator returns the value of the first falsy operand encountered when evaluating from left to right, or the value of the last operand if they are all truthy.
Link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND