import { sample } from "https://deno.land/std@0.139.0/collections/mod.ts";
Returns a random element from the given array.
Example:
import { sample } from "https://deno.land/std@0.139.0/collections/mod.ts"
import { assert } from "https://deno.land/std@0.139.0/testing/asserts.ts";
const numbers = [1, 2, 3, 4];
const random = sample(numbers);
assert(numbers.includes(random as number));
Parameters
array: readonly T[]