diff --git a/src/calculator.js b/src/calculator.js index ecf440df..64fd5688 100644 --- a/src/calculator.js +++ b/src/calculator.js @@ -7,28 +7,29 @@ exports._check = (x, y) => { throw new TypeError(`${x} is not a number`); } if (typeof y !== 'number') { - throw new TypeError(`${y} is not a number`); -} + throw new TypeError(`${y} is not a number`); + } }; exports.add = (x, y) => { - exports._check(x,y) + exports._check(x, y); return x + y; }; exports.subtract = (x, y) => { - exports._check(x,y) + exports._check(x, y); return x - y; }; exports.multiply = (x, y) => { - exports._check(x,y) + exports._check(x, y); return x * y; }; exports.divide = (x, y) => { - exports._check(x,y) + exports._check(x, y); return x / y; }; -module.exports = exports; \ No newline at end of file +module.exports = exports; +