Skip to content

lastIndexOf

Category: String

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

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