Function median

  • Return the median of an array of numbers

    Parameters

    Returns number | undefined

  • Return the median of an array of numbers

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>
    • accessor: ((element, i, array) => number)
        • (element, i, array): number
        • Parameters

          • element: T
          • i: number
          • array: Iterable<T>

          Returns number

    Returns number | undefined