Operators

Abstract equality (==)

Try the free JavaScript compiler

Applies type-dependent loose equality conversion, including null with undefined and numeric conversion of strings against numbers. Object operands may invoke primitive conversion. Prefer explicit normalization for domain comparisons.

Formal Syntax & Structure

javascript syntaxjavascript
left == right

Parameters & Attributes

NameTypeDescription
leftexpressionLeft operand.
rightexpressionRight operand; short-circuiting may skip evaluation where applicable.

Return Value

Boolean

Result of the operation.

Working Example

Example Snippetjavascript
console.log(null == undefined);
JavaScript Reference