- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
lastIndexOf
        Subhajit Sahu edited this page Feb 3, 2021 
        ·
        15 revisions
      
    Find last index of a value.
Alternatives: indexOf, lastIndexOf.
Similar: search, indexOf, hasValue, includes.
function lastIndexOf(x, v, i)
// x: an iterable
// v: search value
// i: start index [END-1]const xiterable = require('extra-iterable');
var x = [1, 2, 3, 2, 5];
xiterable.lastIndexOf(x, 2);
// → 3              ^
var x = [1, 2, 3, 2, 5];
xiterable.lastIndexOf(x, 2, 2);
// → 1        ^