File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const inconsistent = ( a , b ) => {
3
+ const consistent = ( a , b ) => {
4
4
if ( a < 0 ) throw new Error ( 'Expected positive "a"' ) ;
5
5
if ( b > 9 ) return b ;
6
6
if ( a === b ) return - 1 ;
@@ -10,35 +10,35 @@ const inconsistent = (a, b) => {
10
10
} ;
11
11
12
12
try {
13
- const y1 = inconsistent ( - 1 , 7 ) ;
13
+ const y1 = consistent ( - 1 , 7 ) ;
14
14
console . log ( { y1 } ) ;
15
15
} catch ( error ) {
16
16
console . error ( error . message ) ;
17
17
}
18
18
19
19
try {
20
- const y2 = inconsistent ( 5 , 20 ) ;
20
+ const y2 = consistent ( 5 , 20 ) ;
21
21
console . log ( { y2 } ) ;
22
22
} catch ( error ) {
23
23
console . error ( error . message ) ;
24
24
}
25
25
26
26
try {
27
- const y3 = inconsistent ( 5 , 5 ) ;
27
+ const y3 = consistent ( 5 , 5 ) ;
28
28
console . log ( { y3 } ) ;
29
29
} catch ( error ) {
30
30
console . error ( error . message ) ;
31
31
}
32
32
33
33
try {
34
- const y4 = inconsistent ( 5 , 7 ) ;
34
+ const y4 = consistent ( 5 , 7 ) ;
35
35
console . log ( { y4 } ) ;
36
36
} catch ( error ) {
37
37
console . error ( error . message ) ;
38
38
}
39
39
40
40
try {
41
- const y5 = inconsistent ( 5 , '7' ) ;
41
+ const y5 = consistent ( 5 , '7' ) ;
42
42
console . log ( { y5 } ) ;
43
43
} catch ( error ) {
44
44
console . error ( error . message ) ;
You can’t perform that action at this time.
0 commit comments