Find() and findIndex() both fail when used with promises. The reason is the same as for some() and every() , which we studied in Part 3 of this series. If we provide them an async function, a promise is returned every time, and promises being “truthy” objects, searches seem to always be successful.

5m read timeFrom medium.com
Post cover image

Sort: