Skip to content

Commit

Permalink
Fix style guide violations
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrienner1988 committed Jul 11, 2024
1 parent 8097ebc commit a2a3003
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/calculator.js
Original file line number Diff line number Diff line change
@@ -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`);
}
};
Expand All @@ -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;
};

Expand Down

0 comments on commit a2a3003

Please # to comment.