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