Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"no-catch-shadow": 0,
"no-class-assign": 2,
"no-cond-assign": 2,
"no-console": 1,
"no-console": 0,
"no-const-assign": 2,
"no-constant-condition": 2,
"no-continue": 0,
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import add from "./modules/add";
import subtract from "./modules/subtract";
import multiply from "./modules/multiply";
import {addTen, addFive} from "./modules/addNumbers";
import {subtractOne} from "./modules/subtractNumbers";
import {addTen, addFive, addOne} from "./modules/addNumbers";
import {subtractOne, subtractFive, subtractTen} from "./modules/subtractNumbers";
import divide from "./modules/divide";

const number1 = 393;
const number2 = 238;
Expand Down
4 changes: 4 additions & 0 deletions src/modules/addNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ export function addTen(num) {
export function addFive(num) {
return add(num, 5);
}

export function addOne(num) {
return add(num, 1);
}
5 changes: 5 additions & 0 deletions src/modules/divide.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function divide(num1,num2) {
return num1 / num2;
}

export default divide;
5 changes: 5 additions & 0 deletions src/modules/multiply.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function multiply(num1, num2) {
return num1 * num2;
}

export default multiply;
4 changes: 4 additions & 0 deletions src/modules/subtract.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function subtract(num1,num2) {
return num1 - num2;
}
export default subtract;
13 changes: 13 additions & 0 deletions src/modules/subtractNumbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import subtract from "./subtract";

export function subtractOne(num) {
return subtract(num, 1);
}

export function subtractFive(num) {
return subtract(num, 1);
}

export function subtractTen(num) {
return subtract(num, 1);
}