add.js 469 B

1234567891011121314151617181920212223
  1. var createMathOperation = require('./_createMathOperation');
  2. /**
  3. * Adds two numbers.
  4. *
  5. * @static
  6. * @memberOf _
  7. * @since 3.4.0
  8. * @category Math
  9. * @param {number} augend The first number in an addition.
  10. * @param {number} addend The second number in an addition.
  11. * @returns {number} Returns the total.
  12. * @example
  13. *
  14. * _.add(6, 4);
  15. * // => 10
  16. */
  17. var add = createMathOperation(function(augend, addend) {
  18. return augend + addend;
  19. }, 0);
  20. module.exports = add;