• Returns the average value of the given array

    Parameters

    • Optionalvalues: number[]

      the array to calculate

    Returns number | undefined

    the average value of the given array

    average([1, 2, 3]);    // 2