es6-starter-kit
Version:
A pre-configured starter kit bundle to speed-up your development with ES6
18 lines (16 loc) • 425 B
JavaScript
/**
* Sums two numbers
* @author You
* @param {Number} x The first addend
* @param {Number} y The second addend
* @return {Number} The result of the sum
* @signature add :: (Number, Number) -> Number
* @example
* // It returns 10
* add(5, 5);
* @example <caption>With nested functions</caption>
* // It returns 20
* add(add(5, 5), add(5, 5));
*/
const add = (x, y) => x + y;
export default add;