@jagaad/utils
    Preparing search index...

    Function randomItem

    • Returns a random item from the given array.

      randomItem(['apple', 'banana', 'cherry']); // Could be 'apple', 'banana', or 'cherry'
      

      Type Parameters

      • T

      Parameters

      • arr: readonly T[]

      Returns T

      Use sample from es-toolkit instead.