> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript Greater Than Or Equal To

The greater than or equal to (`>=`) operator is a binary relational operator that evaluates whether its left operand is mathematically or lexicographically greater than or equal to its right operand, returning a boolean (`true` or `false`).

```javascript theme={"dark"}
leftOperand >= rightOperand
```

Under the hood, the ECMAScript specification evaluates `x >= y` by performing the Abstract Relational Comparison `x < y` (specifically `IsLessThan(x, y, true)`). If the result of that comparison is `true` or `undefined` (which occurs when an operand evaluates to `NaN`), the `>=` operator returns `false`. Otherwise, it returns `true`.

## Evaluation Mechanics and Type Coercion

The operator applies the `ToPrimitive` abstract operation to both operands before comparing them. The subsequent behavior depends on the resulting primitive types:

**1. Lexicographical String Comparison**
If both resulting primitives are strings, the operator compares them lexicographically based on their sequence of 16-bit unsigned integer values (UTF-16 code units).

```javascript theme={"dark"}
"Z" >= "A";       // true  (UTF-16: 90 >= 65)
"apple" >= "bat"; // false (UTF-16: 97 >= 98 at index 0)
"10" >= "2";      // false (String comparison: "1" is less than "2")
```

**2. Numeric Coercion**
If at least one of the primitive operands is *not* a string, JavaScript applies the `ToNumeric` operation to both operands, coercing them into Numbers or BigInts before performing a mathematical comparison.

```javascript theme={"dark"}
10 >= "2";        // true  ("2" is coerced to Number 2)
true >= 1;        // true  (true is coerced to Number 1)
null >= 0;        // true  (null is coerced to Number +0)
undefined >= 0;   // false (undefined is coerced to NaN)
```

**3. NaN Handling**
If either operand is `NaN`, or coerces to `NaN`, the underlying `IsLessThan` comparison returns `undefined`, causing the `>=` operator to strictly return `false`. This aligns with standard IEEE 754 math logic, where `NaN` is neither greater than, less than, nor equal to any value, including itself.

```javascript theme={"dark"}
NaN >= 3;         // false
3 >= NaN;         // false
NaN >= NaN;       // false
"text" >= 0;      // false ("text" coerces to NaN)
```

**4. BigInt and Number Comparison**
When comparing a `Number` and a `BigInt`, JavaScript compares their exact mathematical values without implicitly converting the BigInt to a Number. This prevents precision loss when comparing values beyond `Number.MAX_SAFE_INTEGER`.

```javascript theme={"dark"}
10n >= 10;        // true
9007199254740992n >= 9007199254740992; // true
```

**5. Object Coercion**
When an operand is an object, JavaScript attempts to convert it to a primitive by invoking its `[Symbol.toPrimitive]()`, `valueOf()`, or `toString()` methods, in that specific order of precedence.

```javascript theme={"dark"}
const obj = { valueOf: () => 5 };
obj >= 4;         // true (obj coerces to Number 5)

const date = new Date("2024-01-01");
date >= 1704067200000; // true (Date coerces to its numeric epoch timestamp)
```

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor JavaScript Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
