JavaScript Symbol match Property Last Updated : 19 May, 2023 Comments Improve Suggest changes Like Article Like Report JavaScript Symbol match property is used to identify the matching of a regular expression against a string and this function is called using String match() method. Syntax: regexp[Symbol.match] = false; Parameters: It does not accept any parameters. Return value: It will return the Boolean value for a string matching if matches found then it will return true otherwise returns false. Below examples illustrate the Symbol.match property in JavaScript. Below examples illustrate the JavaScript Symbol match Property: Example 1: In this example, we will check if a string starts with a particular expression defined in regexp javascript const regexp1 = /geeksforgeeks/; regexp1[Symbol.match] = false; console.log('/geeks/'.startsWith(regexp1)); console.log('/geeksforgeeks/'.endsWith(regexp1)); Output: false true Example 2: In this example, we will pass a regular expression and see the type of error returned. javascript reg[Symbol.match] = false; console.log('/bar/'.startsWith(/bar/)); Output: Error: First argument to String.prototype.startsWith must not be a regular expression. Supported Browsers: The browsers supported by Symbol.match property are listed below: Google Chrome 51Firefox 50Edge 15OperaApple Safari We have a complete list of Javascript symbols' properties and methods, to check those please go through the Javascript Symbol Complete Reference article. Comment More infoAdvertise with us Next Article JavaScript Symbol matchAll Property S SHUBHAMSINGH10 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-Properties JavaScript-Symbol Similar Reads JavaScript Symbol() Constructor The Symbol() constructor is used to create a new symbol. The Symbol() constructor returns a value of the type of symbol with static properties. Every time we call the constructor a unique symbol is created. A Symbol constructor is a primitive data type having no object or no methods which are genera 2 min read JavaScript Symbol constructor Property JavaScript Symbol constructor property is used to return the Symbol constructor function for the object. The function returned by this property is just the reference, not the actual WeakSet. It is an object property of JavaScript and can be used with Strings, Numbers, etc. Syntax: symbol.constructor 1 min read JavaScript Symbol asyncIterator Property JavaScript Symbol asyncIterator property is used to set an object as an async iterable. Iterable properties of this object can be iterated over using a for await...of loop. An async iterable object is any object that returns a function that produces an AsyncIterator for its Symbol.asyncIterator prop 2 min read JavaScript Symbol description Property JavaScript symbol description is an inbuilt property in JavaScript that is used to return the optional description of the specified symbol objects. Syntax: Here "A" is the specified symbol object which might be Symbol('anyValues'), Symbol.iterator, Symbol.for('anyValues') etc. A.description;Paramete 1 min read JavaScript Symbol hasInstance Property JavaScript Symbol hasInstance is used to determine if a given constructor object recognizes the object as its instance. Syntax: [Symbol.hasInstance](Object) Parameters: It accepts a parameter "object". Return value: This returns true if the value is in the chain of the object otherwise false.JavaScr 1 min read JavaScript Symbol isConcatSpreadable Property JavaScript Symbol.isConcatSpreadable is a well-known symbol used to configure if a given object should be flattened to its array elements while using the Array.prototype.concat() method. Syntax: Array[Symbol.isConcatSpreadable]Here Array is the array object which is to be flattened to its array elem 2 min read JavaScript Symbol iterator Property It is an object of Iterables which is also a kind of generalized arrays. Iterables that make any object easier to use in a for..of the loop. We know that arrays are iterative in nature but other than that, there are also several objects which are used for the iterative purpose. Suppose if any object 2 min read JavaScript Symbol match Property JavaScript Symbol match property is used to identify the matching of a regular expression against a string and this function is called using String match() method. Syntax: regexp[Symbol.match] = false; Parameters: It does not accept any parameters. Return value: It will return the Boolean value for 1 min read JavaScript Symbol matchAll Property JavaScript Symbol matchAll property used to return the regular expression that matches against a string. JavaScript String matchAll() method calls this property. Syntax: regExp[Symbol.matchAll](str); Parameter: It takes a string used to find matches of the regular expression against the string. Retu 2 min read JavaScript Symbol replace Property JavaScript Symbol replace the property is used to determine the method that replaces the matched substring of a string. This function is called by the String replace() method. Syntax: [Symbol.replace](string) Parameters: It accepts single parameter "String". Return value: It will return a new string 2 min read Like