1 | var findLastIndex = require('./findLastIndex');
|
2 |
|
3 | /**
|
4 | * Returns last item that matches criteria
|
5 | */
|
6 | function findLast(arr, iterator, thisObj){
|
7 | var idx = findLastIndex(arr, iterator, thisObj);
|
8 | return idx >= 0? arr[idx] : void(0);
|
9 | }
|
10 |
|
11 | module.exports = findLast;
|
12 |
|
13 |
|