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.
Challenge: Implement notPresent(str, sub) that returns true when sub is not in str.
notPresent('hello', 'xyz') // β true
notPresent('hello', 'ell') // β false