Skip to main content
Module

x/structurae/index.ts>SortedArray#set

Data structures for high-performance JavaScript applications.
Latest
method SortedArray.prototype.set
import { SortedArray } from "https://deno.land/x/structurae@4.0.1/index.ts";

Implements in-place replacement of the array elements.

Examples

//=> SortedArray [ 2, 3, 4, 5, 9 ]; sortedArray.set([1, 2, 3]); //=> SortedArray [ 1, 2, 3 ]

Parameters

arr: Array<ItemType>

an array of new elements to use