File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function min() {
32
32
}
33
33
}
34
34
return ar ;
35
- } ; //function _obj2Array
35
+ } , //function _obj2Array
36
36
_compare = function ( current , next ) {
37
37
var i = 0 ,
38
38
n = 0 ,
@@ -83,6 +83,7 @@ function min() {
83
83
}
84
84
return ( next > current ? 1 : - 1 ) ;
85
85
} ; //function _compare
86
+
86
87
if ( argc === 0 ) {
87
88
throw new Error ( 'At least one value should be passed to min()' ) ;
88
89
} else if ( argc === 1 ) {
@@ -91,6 +92,7 @@ function min() {
91
92
} else {
92
93
throw new Error ( 'Wrong parameter count for min()' ) ;
93
94
}
95
+
94
96
if ( ar . length === 0 ) {
95
97
throw new Error ( 'Array must contain at least one element for min()' ) ;
96
98
}
@@ -99,6 +101,7 @@ function min() {
99
101
}
100
102
101
103
retVal = ar [ 0 ] ;
104
+
102
105
for ( i = 1 , n = ar . length ; i < n ; ++ i ) {
103
106
if ( _compare ( retVal , ar [ i ] ) == - 1 ) {
104
107
retVal = ar [ i ] ;
You can’t perform that action at this time.
0 commit comments