Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dallmo_util_array/mod.ts>random_index

deno module, a collection of array util under dallmo-util
Latest
function random_index
import { random_index } from "https://deno.land/x/dallmo_util_array@v1.3.0/mod.ts";

get a random index of an array

Parameters

input_array: any[]
  • the input array

Returns

number

a random index of the input array