js string .find code example Example: string.find javascript var index = string.indexOf(searchStr); var index = string.search(searchStr);