iggs-utils - v2.4.0
    Preparing search index...

    Function takeRandomElements

    • Returns an array of random elements from the provided array, and removes the elements from the array.

      Type Parameters

      • T

      Parameters

      • array: T[]
      • legth: number

        number of elements to pick

      Returns T[]

      an array of random elements from the provided array.