max

The Math.max() method returns the number with the highest value.

Syntax

Math.max(a,b)

Returns

The highest number of the arguments. -Infinity if no arguments are given. NaN if one of the arguments is not a number.

Parameters

a (int/float)
number to compare.
b (int/float)
numbers to compare.