logo
logo

Count Occurrence

Beginner

Count Occurrence

Create a function called
countOccurrence
that takes in a string and a target substring, and returns the number of times the target substring appears in the string. Use an arrow function and the
split()
method.
Console
Submit
Solution
00:00