Skip to content

gt

js
_.gt(value, other)

检查 value 是否大于 other

¥Checks if value is greater than other.

新增于

¥Since

3.9.0

参数

¥Arguments

  1. value (*):要比较的值。

    ¥value ()*: The value to compare.

  2. other (*):要比较的另一个值。

    ¥other ()*: The other value to compare.

返回

¥Returns

(布尔):如果 value 大于 other,则返回 true,否则返回 false

¥(boolean): Returns true if value is greater than other, else false.

示例

¥Example

js
_.gt(3, 1);
// => true

_.gt(3, 3);
// => false

_.gt(1, 3);
// => false

Lodash v4.17 中文网 - 粤ICP备13048890号