Skip to content

Commit 4c8585c

Browse files
committed
export more methods
1 parent ca94721 commit 4c8585c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

server/calculatorCommonjs.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ function multiply(a, b) {
66
return a * b;
77
}
88

9+
var division = (a, b) => {
10+
return a / b;
11+
};
12+
13+
function secretFunction(a, b) {
14+
return `a - b = ${a - b}`;
15+
}
16+
917
module.exports = {
1018
add,
1119
multiply,
20+
division,
1221
};

server/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
var calculator = require('./calculatorCommonjs');
22

33
console.log(calculator.add(12, 3));
4+
5+
console.log(calculator.division(12, 3));
6+
7+
console.log(calculator.secretFunction(12, 3));

0 commit comments

Comments
 (0)