Skip to main content
Module

x/lodash_es/mod.ts>lastIndexOf

lodash for deno use
Latest
function lastIndexOf
import { lastIndexOf } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

This method is like _.indexOf except that it iterates over elements of array from right to left.

Examples

_.lastIndexOf([1, 2, 1, 2], 2); // => 3

// Search from the fromIndex. _.lastIndexOf([1, 2, 1, 2], 2, 2); // => 1

Parameters

array

The array to inspect.

value

The value to search for.

fromIndex