javascript index of a word code example Example: indexof javascript Array.indexOf(searchElement, fromIndex)