* Adds two numbers. * * @static * @memberOf _ * @category Math * @param {number} augend The first number to add. * @param {number} addend The second number to add. * @returns {number} Returns the sum. * @example * * _.add(6, 4); * // => 10
(augend, addend)
| 12976 | * // => 10 |
| 12977 | */ |
| 12978 | function add(augend, addend) { |
| 12979 | return (+augend || 0) + (+addend || 0); |
| 12980 | } |
| 12981 | |
| 12982 | /** |
| 12983 | * Gets the maximum value of `collection`. If `collection` is empty or falsey |