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

x/dallmo_util_array/mod.ts>random_insert

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

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