File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const getX = obj => obj . x ;
3
+ const getX = ( obj ) => obj . x ;
4
4
5
5
console . log ( getX ( { x : 10 } ) ) ; // { x: number }
6
6
console . log ( getX ( { x : 70 } ) ) ; // { x: number }
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const stringify = obj => obj . toString ( ) ;
3
+ const stringify = ( obj ) => obj . toString ( ) ;
4
4
5
5
console . log ( stringify ( 10 ) ) ;
6
6
console . log ( stringify ( 'ten' ) ) ;
@@ -12,7 +12,7 @@ console.log(stringify(false));
12
12
y : 20 ,
13
13
toString ( ) {
14
14
return [ this . x , this . y ] ;
15
- }
15
+ } ,
16
16
} ;
17
17
18
18
console . log ( stringify ( point ) ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const avg = array => {
3
+ const avg = ( array ) => {
4
4
let sum = 0 ;
5
5
for ( const item of array ) {
6
6
sum += item ;
You can’t perform that action at this time.
0 commit comments