• Returns the median of an array anArray using a sort algorithm.

    Parameters

    • anArray: any[]

      the array to consider

    Returns any

    the median of anArray, or undefined if the array is empty