• Get the Median of all Numbers in an Array

    Parameters

    • input: number[]

    Returns number

    Example

    import { array } from "@rjweb/utils"

    const arr = [4, 65, 76, 90, 1, -3]

    array.median(arr) // 35

    Since

    1.12.18

    Supports

    nodejs, browser