主题
lte
js
_.lte(value, other)检查 value 是否小于或等于 other。
¥Checks if value is less than or equal to other.
新增于
¥Since
3.9.0
参数
¥Arguments
value(*):要比较的值。¥
value()*: The value to compare.other(*):要比较的另一个值。¥
other()*: The other value to compare.
返回
¥Returns
(布尔):如果 value 小于或等于 other,则返回 true,否则返回 false。
¥(boolean): Returns true if value is less than or equal to other, else false.
示例
¥Example
js
_.lte(1, 3);
// => true
_.lte(3, 3);
// => true
_.lte(3, 1);
// => false