Skip to main content
Module

x/collections/mod.ts>Vector#slice

Collection data structures that are not standard built-in objects in JavaScript. This includes a vector (double-ended queue), binary heap (priority queue), binary search tree, and a red black tree.
Very Popular
Latest
method Vector.prototype.slice
import { Vector } from "https://deno.land/x/collections@0.12.1/mod.ts";

Returns a shallow copy of a portion of the vector into a new vector. The start and end represent the index of values in the vector. The end is exclusive meaning it will not be included. If the index value is negative, it will be subtracted from the end of the vector. For example, vector.slice(-2) would return a new vector containing the last 2 values.

Parameters

optional
start = [UNSUPPORTED]
optional
end: number