Skip to content

Commit 9beb234

Browse files
committed
Fix code style
1 parent d4f8d0f commit 9beb234

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

JavaScript/1-field.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const getX = obj => obj.x;
3+
const getX = (obj) => obj.x;
44

55
console.log(getX({ x: 10 })); // { x: number }
66
console.log(getX({ x: 70 })); // { x: number }

JavaScript/2-method.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const stringify = obj => obj.toString();
3+
const stringify = (obj) => obj.toString();
44

55
console.log(stringify(10));
66
console.log(stringify('ten'));
@@ -12,7 +12,7 @@ console.log(stringify(false));
1212
y: 20,
1313
toString() {
1414
return [this.x, this.y];
15-
}
15+
},
1616
};
1717

1818
console.log(stringify(point));

JavaScript/4-array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const avg = array => {
3+
const avg = (array) => {
44
let sum = 0;
55
for (const item of array) {
66
sum += item;

0 commit comments

Comments
 (0)