Returns a Boolean value indicating the result of the comparison.
expression1 comparisonoperator expression2
Any comparison operator.
The following describes how the different groups of operators behave depending on the types and values of
Attempt to convert both
If both expressions are strings, do a string comparison.
If either expression is
Negative zero equals Positive zero.
Negative Infinity is less than everything including itself.
Positive Infinity is greater than everything including itself.
If the types of the two expressions are different, attempt to convert them to a String, Number, or Boolean.
NaNis not equal to anything including itself.
Negative zero equals positive zero.
Values are considered equal if they are identical strings, numerically equivalent numbers, the same object, identical Boolean values, or (if different types) they can be coerced into one of these situations.
Every other comparison is considered unequal.
These operators behave the same as the equality operators, except that no type conversion is done. If the types of both expressions are not the same, these expressions always return
Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1). See Version Information.