Skip to content

Commit

Permalink
Merge pull request #1 from Adrienner1988/AdrienneR
Browse files Browse the repository at this point in the history
Fix style guide violations
  • Loading branch information
Adrienner1988 authored Jul 11, 2024
2 parents 8097ebc + a2a3003 commit 40af628
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 40af628

Please sign in to comment.