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

    Function takeRandomElement

    • Returns a random element from the provided array, and removes the element from the array.

      Type Parameters

      • T

      Parameters

      • array: T[]

      Returns T

      a random element from the provided array.