Returns the index of the first occurrence of a substring in the string.
indexOf(substring, startIndex?)
substring
The substring to search for in the string
startIndex optional
The index at which to begin searching. If omitted, search starts at the beginning of the string.
The index of the first occurrence of the specified substring, or -1 if not found.
"banana".indexOf("na")
2
"banana".indexOf("no")
-1