Challenge 5: Find Index of a Specific Value in a String

In this challenge, find the index of the desired value in a string.

Problem Statement

Given a string, use a findOccurence(s) function that allows you to find the first occurrences of "b" and "ccc"​ in the string.


A string


The first occurrence of “b” and “ccc” in the string

Sample Input


Sample Output

[3, 6]

Get hands-on with 1000+ tech skills courses.