Like Array.findIndex but with optional startAt and length parameters to limit the search to a specific section of the array.
constdata = ["red","blue","red","blue"] data.findIndex(v=>v === `red`); // 0 - finds first match findIndex(data, v=>v === `red`, 1); // 2 - finds first match after start index of 1
Like Array.findIndex but with optional
startAtandlengthparameters to limit the search to a specific section of the array.Use findIndexReverse to search backwards through the array.