Symbol.match JavaScript JS

The JavaScript Symbol.match property looks for the matching of a regular expression against a string. Syntax: Symbol.match Parameters: string: It represents the string. Returns: It returns true if a regular expression matches against a string, otherwise, it returns true. Example 1: <!DOCTYPE html> <html> <body> <script> var alpha = /HELLO WORLD/; alpha[Symbol.match] = false; document.write(‘/HELLO … Read more