Max Function
- Mise à jour2025-07-21
- Temps de lecture : 1 minute(s)
Max Function
Syntax
Number Max(Number number1, Number number2, etc.)
Return Value
This function returns the largest number in the set of numbers you pass it. Alternatively, you can use the prototype Max(Array array, [String/Number] [indexOrOffset]) to use this function to find the maximum element in an array. In this case, you can optionally pass a number or string for the second parameter to store the numeric array offset or array index string of the maximum element in the array, respectively.