Whether the "g" flag is used with the regular expression. The global property is read-only.
RegEx
global is a property of an individual regular expression object.
The value of global is true if the "g" flag is used; otherwise, it is false. The "g" flag indicates that the regular expression should be tested against all possible matches in a string.
You cannot change this property directly. However, calling the compile method changes the value of this property.