Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one.
If no occurrences can be found, a count of 0 should be returned. The first argument can be an empty string. The second string argument must be of at least length 1.
strCount('Hello', 'o') // => 1
strCount('Hello', 'l') // => 2
strCount('', 'z') // => 0
strCount('oh goodness gracious', 'o')
strCount('howdy, pardner', 'd')strCount('Incumbent President', 'e')
Want to propose a challenge idea for a future post? Email firstname.lastname@example.org with your suggestions!