Pick random elements from an array.

  • Type Parameters

    • T

    Parameters

    • array: T[]

      Target array

    Returns (count: number) => T[]

    Sampled array