Skip to main content Link Search Menu Expand Document (external link)

>= : Greater Than or Equal Operator


On this page

Summary

Compare if the left value is greater than or equal to the right value.

Syntax



Precedence

Priority level in expression evaluation (1 = highest, 10 = lowest): 6

Evaluated after: ^, *, /, %, +, -

Evaluated before: ==, !=, ??, &&, ||


Operands

Position Type Description
Left Comparable First value to compare
Right Comparable Second value to compare

Returns

Type: Boolean

true if left operand is greater than or equal to right operand, false otherwise.


Examples

Age Verification


  <div class="eligible">
    <p>✓ Age requirement met ( years old)</p>
  </div>

  <div class="ineligible">
    <p>Must be 18 or older (currently )</p>
  </div>

Data:

doc.Params["model"] = new {
    age = 18
};

Output:

<div class="eligible">
  <p>✓ Age requirement met (18 years old)</p>
</div>

Passing Grade


  <div class="pass">
    <h3>Passed</h3>
    <p>Score: /100</p>
  </div>

  <div class="fail">
    <h3>Did Not Pass</h3>
    <p>Score: /100 (70 required)</p>
  </div>

Data:

doc.Params["model"] = new {
    score = 85
};

Output:

<div class="pass">
  <h3>Passed</h3>
  <p>Score: 85/100</p>
</div>

Grade Classification


  <span class="grade-a">A - Excellent</span>

  <span class="grade-b">B - Good</span>

  <span class="grade-c">C - Satisfactory</span>

  <span class="grade-d">D - Needs Improvement</span>

  <span class="grade-f">F - Failing</span>

Free Shipping Eligibility


  <div class="free-shipping">
    <strong>✓ Free Shipping Eligible</strong>
    <p>Order total: $</p>
  </div>

  <div class="shipping-required">
    <p>Add $ more for free shipping</p>
  </div>

Data:

doc.Params["model"] = new {
    orderTotal = 65.00m
};

Output:

<div class="free-shipping">
  <strong>✓ Free Shipping Eligible</strong>
  <p>Order total: $65.00</p>
</div>

Access Level Validation


  <div class="admin-panel">
    <h2>Administration</h2>
    <p>Full access granted (Level )</p>
  </div>

  <div class="moderator-panel">
    <h2>Moderation</h2>
    <p>Limited access (Level )</p>
  </div>

  <div class="user-panel">
    <h2>User Dashboard</h2>
  </div>

Minimum Quantity Check


  
    <div class="valid-order">
      <p>:  units</p>
    </div>
  
    <div class="below-minimum">
      <p>:  units</p>
      <small>Minimum order:  units</small>
    </div>
  


Notes

  • Works with numbers, dates, and comparable types
  • Includes equality (=) unlike > operator
  • String comparison is case-sensitive and uses lexicographic ordering
  • Date comparison compares chronological order
  • Cannot compare incompatible types
  • Commonly used with `` for conditional rendering
  • Can be combined with logical operators (&&, ||)
  • Very common for threshold checks and eligibility validation

See Also