Find an item in an array with the new 'findIndex' method 🔎
Searching for items in an array has been the point of discussion for many years and debate on what is the best and optimum way for searching for objects has had many solutions, some effective and some not.
However, with the all new findIndex
method on Array.prototype
you have the flexibility to search for objects using your own comparison callback method.