Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

pick

import { pick } from "https://git.sr.ht/~ruivieira/deno-experiments/blob/master/randomjs/mod.ts";

Returns a random value within the provided source within the sliced bounds of begin and end.

function pick<T>(
engine: Engine,
source: ArrayLike<T>,
begin?: number,
end?: number,
): T;
§
pick<T>(engine: Engine, source: ArrayLike<T>, begin?: number, end?: number): T
[src]

§Type Parameters

§Parameters

§
source: ArrayLike<T>
[src]

an array of items to pick from

§
begin?: number optional
[src]

the beginning slice index (defaults to 0)

§
end?: number optional
[src]

the ending slice index (defaults to source.length)

§Return Type