Function max

  • Returns the largest element in an iterable. The optional key argument specifies a transform on the elements before comparing them. If the elements in the iterable are objects that implement a custom gt method, this will be called to compare.

    Returns

    The largest element in the iterable.

    Parameters

    • iterable: number[]

      The iterable to inspect.

    Returns number

  • Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>
    • Optional key: Predicate<T, any>

    Returns T

Generated using TypeDoc