Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RandomArray

Random generator for array objects.

Example

let value1 = RandomArray.pick([1, 2, 3, 4]); // Possible result: 3

Hierarchy

  • RandomArray

Index

Methods

Methods

Static pick

  • pick<T>(values: T[]): T
  • Picks a random element from specified array.

    Type parameters

    • T

    Parameters

    • values: T[]

      an array of any type

    Returns T

    a randomly picked item.

Generated using TypeDoc