Given a sentence and a word, return the index of the last occurrence of the word in the sentence, but only check the first half of the sentence. If there is no occurrence, return -1.
// input:
const s = 'well hi how are you? Good hi', w = 'hi'
// output:
5
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)