|Property/method value type:||Boolean primitive|
|Argument list:||anOperand1||A value to be compared|
|anOperand2||Another value to be compared|
When testing for inequality, the following rule is invariant:
A != B
is equivalent to:
!(A == B)
Also, the rule of positioning allows that:
A == B
is identical to:
B == A
(Apart from the fact that exchanging the operands in this way alters the order in which they are evaluated.)
Exchanging the operands may have undesirable side effects if they are expressions. For example, they may call functions and test the results. If the functions are not totally independent of one another, you may get unexpected results.
The associativity is from left to right.
Refer to the Operator Precedence topic for details of execution order.
Refer to the Equality expression topic for a discussion on the ECMA standard definition of the equality testing rules.
|See also:||ASCII, Associativity, Equal to (==), Equality expression, Equality operator, Greater than (>), Greater than or equal to (>=), Identically equal to (===), Less than (<), Less than or equal to (<=), Logical expression, Logical NOT - complement (!), Logical operator, NOT Identically equal to (!==), Operator Precedence, Relational expression, Relational operator, typeof, Unicode|
ECMA 262 edition 2 - section - 11.9.2
ECMA 262 edition 2 - section - 11.9.3
ECMA 262 edition 3 - section - 11.9.2
ECMA 262 edition 3 - section - 11.9.3