Given a sentence and a word, return the index of the last occurrence of the word in the sentence. If there is no occurrence, return -1.
// input:
const s = 'hello world hello', w = 'hello'
// output:
12
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)