Java Reference
In-Depth Information
8 > 8 || 8 === 8;
<< true
8 > "8" || 8 === "8";
<< false
There is also a similar "less-than or equal-to" operator:
-1 <= 1;
<< true
-1 <= -1;
<< true
These operators can also be used with strings, which will be alphabetically ordered to check
if one string is "less than" the other:
"apples" < "bananas";
>> true
Be careful, though, as the results are case-sensitive and upper-case letters are considered to
be "less than" lower-case letters:
"apples" < "Bananas";
>> false
Search WWH ::




Custom Search