get first index of character in string javascript code example Example: indexof javascript Array.indexOf(searchElement, fromIndex)