Sign In
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.
Click to go back
Click to go forward
Refresh preview
Console
Submit
Solution
00:00
Back to Exercises