Function max

  • Namespace

    ArrayUtils

    Finds the maximum value in an array of numbers.

    Parameters

    • numbers: number[]

      An array of numbers

    Returns number

    The maximum value in the array

    Example

    const numbers = [5, 10, 2, 8];
    const maxValue = maxArray(numbers);
    console.log(maxValue); // Output: 10

Generated using TypeDoc