Array find() and findIndex()
Widely available since 2018-03-01 (baseline high)
The find()
and findIndex()
methods of arrays and typed arrays search an array for the first item that satisfies a test function.
Compatibility (view on caniuse.com)
- Chrome 45 Released on 2015-09-01
- Chrome Android 45 Released on 2015-09-01
- Edge 12 Released on 2015-07-29
- Firefox 25 Released on 2013-10-29
- Firefox for Android 4 Released on 2011-03-29
- Safari 8 Released on 2014-10-16
- Safari on iOS 8 Released on 2014-09-17
Specifications
- https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.find
- https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.findindex
- https://tc39.es/ecma262/multipage/indexed-collections.html#sec-%25typedarray%25.prototype.find
- https://tc39.es/ecma262/multipage/indexed-collections.html#sec-%25typedarray%25.prototype.findindex