The Wayback Machine - https://web.archive.org/web/20220712205849/https://github.com/lodash/lodash/blob/master/subtract.js
Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
import createMathOperation from './.internal/createMathOperation.js'
/**
* Subtract two numbers.
*
* @since 4.0.0
* @category Math
* @param {number} minuend The first number in a subtraction.
* @param {number} subtrahend The second number in a subtraction.
* @returns {number} Returns the difference.
* @example
*
* subtract(6, 4)
* // => 2
*/
const subtract = createMathOperation((minuend, subtrahend) => minuend - subtrahend, 0)
export default subtract