JavaScript >= Greater than or equal Operator
The greater than or equal operator (>=) checks whether the left value is larger than or equal to the right one.
Description
The greater than or equal operator >= returns true if the left operand is larger than or equal to the right. It uses the same conversion rules as >.
For numbers, a >= b is the same as !(a < b), except when NaN is involved: every comparison with NaN is false. Because relational operators convert null to 0 but equality doesn't, null >= 0 is true while null == 0 is false.
It's commonly used for thresholds, such as age limits, minimum lengths and passing scores. To check that a value falls within a range, combine two comparisons: value >= min && value <= max.
Properties
- Operator
>=- Category
- Comparison
- Precedence
- 9 (1 is lowest, 18 is highest)
- Associativity
- left-to-right
Syntax
x >= yExample
Browser Support
The following information will show you the current browser support for the >= operator. Hover over a browser icon to see the version that first introduced support for this operator.
Desktop





Tablets & Mobile





