Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
18 lines (16 sloc)
469 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |