Operators
Logical and (&&)
Returns the first falsy operand or the evaluated right operand when the left is truthy. The right expression is skipped when the left is falsy.
Formal Syntax & Structure
javascript syntaxjavascript
left && rightParameters & Attributes
| Name | Type | Description |
|---|---|---|
| left | expression | Left operand. |
| right | expression | Right operand; short-circuiting may skip evaluation where applicable. |
Return Value
operand value
Result of the operation.
Working Example
Example Snippetjavascript
console.log(0 && 9);