Checks if value is strictly greater thanother. Uses the same relational comparison as JavaScript’s > operator. Part of Lodash Lang since 3.9.0 (stable — not deprecated). Note: equal values return false — use _.gte for greater-or-equal.
Pass the value you want to inspect or convert. Read the return type carefully before you use the result.
Syntax
Call _.gt. Start with this line.
Lodash
_.gt(value, other)
Call
What it does
_.gt(value, other)
Primary signature.
_.gt(value)
Check, compare, clone, or convert a value.
Prefer import gt from "lodash/gt" when you want a smaller bundle.
Why gt. Named helper reads clearly next to other Lodash lang predicates.
Compatibility
Browser & Runtime Support
_.gt is a Lodash 3.9+ / 4.x Lang helper. It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native engines already have >; Lodash provides a function form for composition.
✓ Stable · Lodash 3.9.0+
_.gt()
Available in [email protected] full builds and the lodash/gt modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.gtLodash 3.9.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import gt from "lodash/gt" for smaller builds. Equivalent to the native > operator as a named function.
Frequently Asked Questions
_.gt(value, other) returns true when value is strictly greater than other. It uses the same relational comparison as JavaScript’s > operator.
Yes. For the same operands you get the same truth value as the binary > operator.
gt is strict greater-than. gte is greater-than-or-equal, so _.gte(3, 3) is true while _.gt(3, 3) is false.
Any ordered comparison involving NaN is false in JavaScript. Use Number.isFinite or an explicit NaN check when you need special handling.
Like > on strings: UTF-16 code unit order, not locale-aware collation. Prefer Intl.Collator for human language sorting.
Use import gt from "lodash/gt" or require("lodash/gt") so bundlers can tree-shake unused Lodash code. Full build: import _ from "lodash" then _.gt.