You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you call "abc".match( RegExp.prototype ) the console will give an error: Method RegExp.prototype.exec called on incompatible receiver [object Object]
To avoid this, you need to convert RegExp.prototype to a String, like this:
When you call
"abc".match( RegExp.prototype )
the console will give an error: Method RegExp.prototype.exec called on incompatible receiver [object Object]To avoid this, you need to convert RegExp.prototype to a String, like this:
"abc".match( RegExp.prototype.toString() ); \\null
which returns
null
because the match method could not find any string with the pattern of"/(?:)/"
.When match finds something it will return an Array Object, for example:
"abc".match(/ab/);
returns["ab"];
PR #1397
The text was updated successfully, but these errors were encountered: