@extra-array/last-index-of.min
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.

This is browserified, minified version of @extra-array/last-index-of.
It is exported as global variable array_lastIndexOf.
CDN: unpkg, jsDelivr.


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

Package Sidebar

Install

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

Weekly Downloads

1

Version

2.10.19

License

MIT

Unpacked Size

5.47 kB

Total Files

8

Last publish

Collaborators

  • wolfram77