Math.min()
syntax: |
Math.min(x, y) |
where: |
x - a number.
y - a number.
|
return: |
number - the smaller of x and y. Returns NaN if either argument cannot be converted to a number.
|
description: |
Returns NaN if either argument cannot be converted to a number.
|
example: |
//The smaller of x and y is returned //in the following function: function compute_min(x, y) { return Math.min(x, y) } //If x = a and y = 4 the return is NaN //If x > y the return is y //If y > x the return is x |