random
Used to generate random results: numbers, choices, probabilities, etc.
api
• random.choose••••••••Returns a or b, randomly 50/50.
• random.arrayChoose•••Picks a random element from the array.
• random.getInt••••••••Returns a random integer between two numbers.
• random.shuffle•••••••Shuffles the elements in the array. Modifies the original array.
• random.chance••••••••Returns true
if it occurs (based on chance), false
otherwise.