indexOf

indexOf

> Functions

Determines the position of the first occurrence of the string search in the string string.

Parameters
Return
Examples

indexOf("Hello", "llo") // 2 indexOf("Hello", "zzz") // -1 indexOf("Hello world", "l", 0) // 2 indexOf("Hello world", "l", 5) // 9