diff --git a/src/calculator.js b/src/calculator.js index f41ea2af..924b58e7 100644 --- a/src/calculator.js +++ b/src/calculator.js @@ -1,8 +1,8 @@ exports._check = (x, y) => { - if (typeof x !== "number") { + if (typeof x !== 'number') { throw new TypeError(`${x} is not a number`); } - if (typeof y !== "number") { + if (typeof y !== 'number') { throw new TypeError(`${y} is not a number`); } }; @@ -13,17 +13,17 @@ exports.add = (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; };