Array findLast() and findLastIndex()
Newly available since 2022-08-23
The findLast()
and findLastIndex()
methods of arrays and typed arrays search an array in reverse order for the first item that satisfies a test function.
Learning resources on MDN
Browser support
- Chrome 97 Released on 2022-01-04
- Chrome Android 97 Released on 2022-01-04
- Edge 97 Released on 2022-01-06
- Firefox 104 Released on 2022-08-23
- Firefox for Android 104 Released on 2022-08-23
- Safari 15.4 Released on 2022-03-14
- Safari on iOS 15.4 Released on 2022-03-14
Specifications
- ECMAScript Language Specification (#sec-array.prototype.findlast), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-array.prototype.findlastindex), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-%25typedarray%25.prototype.findlast), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-%25typedarray%25.prototype.findlastindex), from TC39 (Ecma International).