What do we mean by Min function of Math class?

 Posted by Rajesh_Kumar on 2/17/2014 | Category: JavaScript Interview questions | Views: 544 | Points: 40
Answer:

The Math.min() function returns the smallest of zero or more numbers.Or we can say that,it return the number with the smallest value.
Min is also an static method of Math,we always use it as Math.min().

Syntax:
Math.min(value1,value2,...,valueN);
Example:
var result1 = Math.min(15,25);
//Output:15
var result2 = Math.min(0,1,2,3);
//Output:0
var result3 = Math.min(1.1,2.2);
//Output:1.1


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response