Syntax math.max(num1, num2) The max() method of the Math object gets the maximum number of the two parameters passed to it.The larger value is returned as the result. This example takes the two numbers entered and determines which is the larger number. Enter First Number: Enter Second Number: The Maximum number is: