Javascript Match() Function

The match() function of string object returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. Use it for example to check two strings are equivalent.

Syntax

Javascript Match() Function Example