🏠 New in High Baseline Support: Array find() and findIndex()
March 20, 2019
caniuse · mdn · [spec]([‘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’])
The find()
and findIndex()
methods of arrays and typed arrays search an array for the first item that satisfies a test function.