zeed
    Preparing search index...

    Function arrayShuffleInPlace

    • Shuffle an array in-place using a secure random source if available. Note: uses Array.sort with random comparator which is sufficient for many cases but not perfectly uniform. Returns the same mutated array.

      Type Parameters

      • T

        element type

      Parameters

      • arr: T[]

      Returns T[]

      the shuffled array (same instance)