indexOfRetrieves the index of first occurrence of a substring in a string.indexOf(searchString, substring)CopyParameters#searchString: The string to search withinsubstring: The string to find in searchStringReturns#The index within searchString of the first occurrence of the specified substring.