Skip to content

Commit 4d85662

Browse files
committed
Improve code style
1 parent d1e0b84 commit 4d85662

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

JavaScript/1-mixed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const adder = (value) => (x) => value += x;
3+
const adder = (value) => (x) => (value += x);
44

55
const a1 = adder(2);
66

JavaScript/3-mixed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ class Adder {
66
}
77

88
add(x) {
9-
return this.value += x;
9+
this.value += x;
10+
return this.value;
1011
}
1112
}
1213

0 commit comments

Comments
 (0)