Array.prototype.findLastIndexintermediateconst words = ['hi', 'hello', 'hey']
words.findLastIndex(w => w.startsWith('h')) // β 2Use findLastIndex() to find the last position of a string matching a pattern.
findLastIndex() works just as well with strings and any other element type.
Challenge: Implement lastLongIndex(strs, minLen) that returns the index of the last string with length >= minLen.
lastLongIndex(['hi', 'hello', 'world', 'ok'], 5) // β 2
lastLongIndex(['a', 'b', 'c'], 3) // β -1