mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
19 lines
431 B
JavaScript
19 lines
431 B
JavaScript
import createMathOperation from './.internal/createMathOperation.js';
|
|
|
|
/**
|
|
* Adds two numbers.
|
|
*
|
|
* @since 3.4.0
|
|
* @category Math
|
|
* @param {number} augend The first number in an addition.
|
|
* @param {number} addend The second number in an addition.
|
|
* @returns {number} Returns the total.
|
|
* @example
|
|
*
|
|
* add(6, 4);
|
|
* // => 10
|
|
*/
|
|
const add = createMathOperation((augend, addend) => augend + addend, 0);
|
|
|
|
export default add;
|