Given a sentence and a word, return the number of times the word appears in the sentence.
// input:
const s = 'hello world hello', w = 'hello'
// output:
2
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)
Given a sentence and a word, return the number of times the word appears in the sentence.
// input:
const s = 'hello world hello', w = 'hello'
// output:
2
/* output */