File tree Expand file tree Collapse file tree 1 file changed +3
-30
lines changed
Expand file tree Collapse file tree 1 file changed +3
-30
lines changed Original file line number Diff line number Diff line change 2020***************************************************************************************/
2121
2222const check_nums = ( num1 , num2 ) => {
23- if ( ! num1 || ! num2 || num1 === num2 ) return '-1'
24- return num2 > num1 ? 'true' : 'false'
23+ if ( ! num1 || ! num2 || num1 === num2 ) return '-1'
24+ return num2 > num1 ? 'true' : 'false'
2525}
2626
2727
2828console . log ( check_nums ( 1 , 3 ) ) //true
2929console . log ( check_nums ( 5 , 7 ) ) //true
30- console . log ( check_nums ( 7 , 5 ) ) //false
30+ console . log ( check_nums ( 7 , 5 ) ) //false
3131console . log ( check_nums ( 7 ) ) //-1
3232console . log ( check_nums ( ) ) //-1
33-
34-
35-
36-
37-
38-
39-
40-
41-
42-
43-
44-
45-
46-
47-
48-
49- // function CheckNums(num1,num2) {
50-
51- // if (num1 === num2) {
52- // return "-1";
53- // } else if (num2 > num1) {
54- // return true;
55- // } else {
56- // return false;
57- // }
58-
59- // }
You can’t perform that action at this time.
0 commit comments