@extra-array/last-index-of
TypeScript icon, indicating that this package has built-in type declarations

2.10.19 • Public • Published

Finds last index of a value. 📦 😺 🏃 📼 🌔 📜 📰 📘

Alternatives: indexOf, lastIndexOf.
Similar: search, indexOf, isValue, includes.

This is part of package extra-array.


array.lastIndexOf(x, v, [i]);
// x: an array
// v: search value
// i: start index (X-1)
const array = require("extra-array");

var x = [1, 2, 3, 2, 5];
array.lastIndexOf(x, 2);
// 3              ^

var x = [1, 2, 3, 2, 5];
array.lastIndexOf(x, 2, 2);
// 1        ^


References

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @extra-array/last-index-of

      Weekly Downloads

      5

      Version

      2.10.19

      License

      MIT

      Unpacked Size

      4.33 kB

      Total Files

      8

      Last publish

      Collaborators

      • wolfram77