how to find an index of an element in a string javascript code example Example: indexof javascript Array.indexOf(searchElement, fromIndex)