Function mean

  • Return the mean of an array of numbers

    Parameters

    Returns number | undefined

  • Return the mean of an array of numbers

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>
    • accessor: ((datum, index, array) => number)
        • (datum, index, array): number
        • Parameters

          • datum: T
          • index: number
          • array: Iterable<T>

          Returns number

    Returns number | undefined