common-stuff
    Preparing search index...

    Function randomChoices

    • Generate new array by randomly picking items from provided array

      Type Parameters

      • T

      Parameters

      • array: readonly T[]
      • length: number

      Returns T[]

      randomChoices([1, 2], 3)
      // [2, 2, 1]