Array find() and findIndex()
Widely available
The find()
and findIndex()
methods of arrays and typed arrays search an array for the first item that satisfies a test function.
To learn more, see
Array.prototype.find(),
Array.prototype.findIndex(),
TypedArray.prototype.find(),
TypedArray.prototype.findIndex() at MDN.
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 37 Released on 2015-03-31
- Firefox for Android 37 Released on 2015-03-31
- Safari 10 Released on 2016-09-20
- Safari on iOS 10 Released on 2016-09-13
Specifications
- ECMAScript Language Specification (#sec-array.prototype.find), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-array.prototype.findindex), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-%25typedarray%25.prototype.find), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-%25typedarray%25.prototype.findindex), from TC39 (Ecma International).