Skip to main content
Module

x/dallmo_util_math/etc/deps.deno.ts>dallmo_util_array.random_item

deno module, a collection of math util under dallmo-util
Latest
function dallmo_util_array.random_item
import { dallmo_util_array } from "https://deno.land/x/dallmo_util_math@v1.2.0/etc/deps.deno.ts";
const { random_item } = dallmo_util_array;

draw an item from an array randomly

Parameters

input_array: any[]
  • the input array

Returns

any

return one of the item inside the given array