Returns a Boolean value indicating the result of the comparison.
Syntaxexpression1 comparisonoperator expression2
See Remarks.
var x = 5;
var y = 7;
var z = (x > y);
var z = (x < y);
var z = (y >= x);
var z = (y <= x);
Remarks
When comparing strings, JavaScript uses the Unicode character value of the string expression.
The following describes how the different groups of operators behave depending on the types and values of expression1 and expression2 :
Relational operators: < , > , <= , >=
Equality operators: == , !=
Identity operators: === , !==
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 false.
AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4