Lodash _.gte() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
Lang

Definition

Checks if value is greater than or equal to other. Uses JavaScript’s >= comparison. Part of Lodash Lang since 3.7.0 (stable in 4.x — not deprecated).

Pass the value you want to inspect or convert. Read the return type carefully before you use the result.

Syntax

Call _.gte. Start with this line.

Lodash
_.gte(value, other)
CallWhat it does
_.gte(value, other)Primary signature.
_.gte(value)Check, compare, clone, or convert a value.

Prefer import gte from "lodash/gte" when you want a smaller bundle.

Library declarations
Lodash
_.gte(value, other)

Parameters

ParameterDescription
valueRequired. Left operand to compare
otherRequired. Right operand / threshold

Return Value

Return ValueDescription
*true or false

Lodash Examples

Example 1 — Official: Greater

When the left value is larger, the result is true.

Lodash
_.gte(3, 1);
// → true
Try It Yourself

How It Works

  1. Call. Official sample: _.gte(3, 1).
  2. Compare. Same as 3 >= 1.
  3. Result. true — 3 is greater than 1.
  4. Use. Typical “score at least threshold” check when the score is higher.

Example 2 — Official: Equal

Equality passes — that is the “or equal” part of gte.

Lodash
_.gte(3, 3);
// → true
Try It Yourself

How It Works

  1. Equal values. Both sides are 3.
  2. Inclusive. 3 >= 3 is true.
  3. Contrast. _.gt(3, 3) would be false.
  4. Tip. Prefer gte for “minimum” / “on or after” rules.

Example 3 — Official: Less

When the left value is smaller, the result is false.

Lodash
_.gte(1, 3);
// → false
Try It Yourself

How It Works

  1. Compare. 1 >= 3 is false.
  2. No throw. You get a clean boolean — safe in filters and guards.
  3. Mirror. For “at most”, use _.lte.
  4. Order. Left is the subject; right is the bound.

Example 4 — _.gte vs _.gt

Equal values are the key difference between the two helpers.

Lodash
_.gte(3, 3);  // → true
_.gt(3, 3);   // → false

_.gte(4, 3);  // → true
_.gt(4, 3);   // → true
Try It Yourself

How It Works

  1. Equal case. Only gte accepts equality.
  2. Strict greater. Both agree when the left is larger.
  3. Pick gte. Inclusive floors, ages “18+”, scores “≥ 60”.
  4. Pick gt. Exclusive bounds — “must be higher than”.

Example 5 — NaN Is Never Ordered

Any relational compare involving NaN is false.

Lodash
_.gte(NaN, 1);
// → false

_.gte(1, NaN);
// → false
Try It Yourself

How It Works

  1. Language rule. NaN >= x and x >= NaN are both false.
  2. Same for gt/lt/lte. Ordered helpers share this pitfall.
  3. Guard first. Use _.isNumber or Number.isFinite when needed.
  4. Not equality. For “is this NaN?”, use _.isNaN.

Browser & Runtime Support

_.gte is a Lodash Lang helper (added in 3.7.0, stable in 4.x). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash.

✓ Stable · Lodash 3.7.0+

_.gte()

Available in [email protected] full builds and the lodash/gte modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.

100% With Lodash 3.7.0+
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
_.gte Lodash 3.7.0+

Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import gte from "lodash/gte" for smaller builds. Native value >= other is equivalent when you do not need a named Lodash predicate.

Frequently Asked Questions

_.gte(value, other) returns true when value is greater than or equal to other, using the same rules as JavaScript’s >= operator.
Yes. Lodash’s gte uses the language’s greater-than-or-equal comparison, so the boolean matches >= for the same operands.
_.gte(a, b) is true when a > b or when a and b compare as equal. _.gt is true only when strictly greater — equal values fail.
Ordered comparisons with NaN are always false in JavaScript, including >= and <=.
Use it for inclusive thresholds — minimum scores, ages, deadlines on or after a date — or as a named predicate in callbacks alongside other Lodash lang helpers.
Use import gte from "lodash/gte" or require("lodash/gte") for tree-shaking friendly bundles. Full build: import _ from "lodash" then _.gte.

Next: _.isArguments()

Check whether a value is an arguments object.

_.isArguments() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful