Friday, November 29, 2013

Javascript find minimum of multiple numbers

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);