Availability: |
| ||||||||
Property/method value type: | Boolean primitive | ||||||||
JavaScript syntax: | - | anOperand1 > anOperand2 | |||||||
Argument list: | anOperand1 | A value that can be compared numerically or lexically | |||||||
anOperand2 | A compatible value |
Returns true if the left operand is numerically greater than the right operand or is sorted later in the Unicode collating sequence when two string values are compared.
In numeric comparisons, the presence of NaN in either or both operands will yield undefined instead of true or false.
When comparing two strings, a prefixing plus sign is present, then a numeric coercion of a string takes place before the comparison. Numeric coercion takes place when either of the operands is numeric.
In ECMA-compliant JavaScript implementations, string values are simply compared according to the Unicode character code point values, with no attempt to provide the more complex semantically oriented definitions of character and string equality defined in the Unicode version 2.0 specification.
The associativity is left to right.
Refer to the Operator Precedence topic for details of execution order.
The result is the Boolean value true if anOperand1 is numerically or lexically greater than anOperand2 otherwise false is returned.
ECMA 262 edition 2 - section - 11.8.2
ECMA 262 edition 2 - section - 11.8.5
ECMA 262 edition 3 - section - 11.8.2
ECMA 262 edition 3 - section - 11.8.5
Prev | Home | Next |
Grayscale() | Up | Greater than or equal to (>=) |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |