.search()

Term side of the Card
Topic: String
Unit title: .search()
Categories: Method
Explanation side of the Card

Explanation: The method that searches for a match between the string on which it's called and a regular expression. It returns the index of the first match or -1 if no match is found.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 1
  • The safari browser supports this feature starting from version 1
Availability: