Relational operator (Definition)

Relational operators are used to create relational expressions.


ECMAScript edition - 2
Property/method value type:Boolean primitive

Relational operators are used in relational expressions and always yield a Boolean result.

Although generally considered to be member of the relational operator set, equality and non-equality tests are classified as equality operators in the ECMA standard.

The following table lists all operators that could be loosely classified or specifically classified as relational operators:

==Equal to
===Identically equal to
!=NOT equal to
!==NOT identically equal to
<Less than
<=Less than or equal to
>Greater than
>=Greater than or equal to

It follows that all equality operators are generally classifiable as relational operators and all relational operators are members of the set of logical operators, since they all yield a Boolean value as a result.

See also:Equal to (==), Equality operator, Greater than (>), Greater than or equal to (>=), Identically equal to (===), Less than (<), Less than or equal to (<=), NOT Equal to (!=), NOT Identically equal to (!==), Relational expression


ECMA 262 edition 2 - section - 11.8

ECMA 262 edition 3 - section - 11.8

Wrox Instant JavaScript - page - 19