Skip to content

subtract

js
_.subtract(minuend, subtrahend)

减去两个数字。

¥Subtract two numbers.

新增于

¥Since

4.0.0

参数

¥Arguments

  1. minuend (数值):减法中的第一个数字。

    ¥minuend (number): The first number in a subtraction.

  2. subtrahend (数值):减法中的第二个数字。

    ¥subtrahend (number): The second number in a subtraction.

返回

¥Returns

(数值):返回差值。

¥(number): Returns the difference.

示例

¥Example

js
_.subtract(6, 4);
// => 2

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