Konnektr Logo

max

Finds the maximum value in an array of numbers.

max

Finds the maximum value in an array of numbers.

Type: transform

Parameters

  • input (array): The input array of numbers or individual number arguments.

Returns

Type: number

The maximum value, or NaN if input is not an array.

Examples

max([1, 5, 3, 2]) // 5
[10, 20, 15]|max // 20
max(1, 5, 3, 2) // 5

On this page