You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
511 B

4 years ago
  1. var createMathOperation = require('./_createMathOperation');
  2. /**
  3. * Subtract two numbers.
  4. *
  5. * @static
  6. * @memberOf _
  7. * @since 4.0.0
  8. * @category Math
  9. * @param {number} minuend The first number in a subtraction.
  10. * @param {number} subtrahend The second number in a subtraction.
  11. * @returns {number} Returns the difference.
  12. * @example
  13. *
  14. * _.subtract(6, 4);
  15. * // => 2
  16. */
  17. var subtract = createMathOperation(function(minuend, subtrahend) {
  18. return minuend - subtrahend;
  19. }, 0);
  20. module.exports = subtract;