If you ever need to find the smallest number from the set of numbers using javascript you can use the Math.min function to get the minimum from the set. Example :
var a = 23;
var b = 66;
var c = 4;
var min;
min = Math.min(a,b,c);
alert(min);
var a = 23;
var b = 66;
var c = 4;
var min;
min = Math.min(a,b,c);
alert(min);
No comments:
Post a Comment