We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Find last index of a value.
Alternatives: indexOf, lastIndexOf. Similar: search, indexOf, isValue, includes.
function lastIndexOf(x, v, i) // x: an array // v: search value // i: begin index [|x|-1]
const xarray = require('extra-array'); var x = [1, 2, 3, 2, 5]; xarray.lastIndexOf(x, 2); // → 3 ^ var x = [1, 2, 3, 2, 5]; xarray.lastIndexOf(x, 2, 2); // → 1 ^