Skip to content

indexOf

Category: String

Returns the zero-based index of the first occurrence of the substring, or -1 if not found

  • Return type: integer
  • Parameters:
    • substring string — Substring to search for
'Hello World'.indexOf('World')
Patient.name.family.indexOf('Doe')