lastIndexOf

Array
since 0.1.0

Returns

number the index of the matched value, else `-1`.

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

Example of Lodash _.lastIndexOf

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

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