Skip to main content
Module

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

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

insert an item into an array with random position

Parameters

input_array: any[]
  • the input array
new_item: any
  • the item to be inserted into the input array

Returns

any[]

a new array with the new item inserted