https://docs.vultr.com/javascript/standard-library/Array/find
findindexof findIndex() in JavaScript
The findIndex() method in JavaScript returns the index of the first element in an array that satisfies a given condition. If no element matches, it returns -1.
rray.findIndex(callback(element, index, array));
callback → A function that tests each element.
Returns → The index of the first matching element or -1 if no match is found.
Example Usage:
javascript
