• Get the highest and lowest value in an array of numbers.

    Parameters

    • values: number[]

      The array of numbers.

    Returns {
        max: number;
        min: number;
    } | undefined

    Undefined if the input array is empty, otherwise the highest and lowest values.