Given a string and a character, return the number of occurrences of the character in the string.
// input:
const s = 'hello world', c = 'o'
// output:
2
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)
Given a string and a character, return the number of occurrences of the character in the string.
// input:
const s = 'hello world', c = 'o'
// output:
2
/* output */