Hello Reader's! if you have to get the smallest number from the array, Then you can use the JS for short calculation. And here is the example:-
Lets say the array is
[0] = 54.25
[1] = 536.2
[2] = 100.2
Now make a function and use the Math.min.apply function in it.
Array.min = function( array ){
return Math.min.apply( Math, array );
};
and then:
var minimum = Array.min(array);
0 Comment(s)