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

    2.10.18 • 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

    Install

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

    DownloadsWeekly Downloads

    164

    Version

    2.10.18

    License

    MIT

    Unpacked Size

    4.28 kB

    Total Files

    7

    Last publish

    Collaborators

    • wolfram77