Given a sentence and a word, return the index of all occurrences of the word in the sentence.
// input:
const s = 'One gecko is green, the other gecko is blue', w = 'gecko'
// output:
[4, 30]
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)
Given a sentence and a word, return the index of all occurrences of the word in the sentence.
// input:
const s = 'One gecko is green, the other gecko is blue', w = 'gecko'
// output:
[4, 30]
/* output */