String.prototype.lastIndexOfbeginnerconst str = 'abcabc'
str.lastIndexOf('a') // β 3
str.lastIndexOf('z') // β -1
str.lastIndexOf('b', 3) // β 1Use lastIndexOf() to find the index of the last occurrence of a substring, searching from right to left.
str.lastIndexOf(searchValue) returns the index of the last occurrence of searchValue, or -1 if not found.
Challenge: Implement findLast(str, sub) using .lastIndexOf().
findLast('abcabc', 'abc') // β 3
findLast('hello', 'l') // β 3