Skip to main content
Module

x/collections/vector.ts>Vector#findLastIndex

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.
Latest
method Vector.prototype.findLastIndex
import { Vector } from "https://deno.land/x/collections@0.12.1/vector.ts";

Returns the index of the last value in the vector that satisfies the provided testing function or -1 if it is not found. Optionally, you can search a subset of the vector by providing an index range. 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.

Parameters

callback: (
value: T,
index: number,
vector: Vector<T>,
) => unknown
optional
start: number
optional
end: number

Returns

number

Parameters

callback: (
value: T,
index: number,
vector: Vector<T>,
) => unknown
optional
thisArg: U
optional
start: number
optional
end: number

Returns

number