Options
All
  • Public
  • Public/Protected
  • All
Menu

Module max

Index

Functions Math

Math Functions

  • max<T>(array: ArrayLike<T>): T
  • Computes the maximum value of array. If array is empty or falsey, undefined is returned.

    since

    5.6.0

    example
    _.max([4, 2, 8, 6]);
    // => 8

    _.max([]);
    // => undefined

    Type Parameters

    • T

    Parameters

    • array: ArrayLike<T>

      The array to iterate over.

    Returns T

    Returns the maximum value.