We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4f8d0f commit 9beb234Copy full SHA for 9beb234
JavaScript/1-field.js
@@ -1,6 +1,6 @@
1
'use strict';
2
3
-const getX = obj => obj.x;
+const getX = (obj) => obj.x;
4
5
console.log(getX({ x: 10 })); // { x: number }
6
console.log(getX({ x: 70 })); // { x: number }
JavaScript/2-method.js
-const stringify = obj => obj.toString();
+const stringify = (obj) => obj.toString();
console.log(stringify(10));
console.log(stringify('ten'));
@@ -12,7 +12,7 @@ console.log(stringify(false));
12
y: 20,
13
toString() {
14
return [this.x, this.y];
15
- }
+ },
16
};
17
18
console.log(stringify(point));
JavaScript/4-array.js
-const avg = array => {
+const avg = (array) => {
let sum = 0;
for (const item of array) {
sum += item;
0 commit comments