String.matchAll and RegExp.matchAll need updating?

These pages seem to be out of date or incomplete

Based on this Stack Overflow answer:

Basically it looks like String.matchAll does not just take a regular expression. It takes any object that implements the iterator protocol

Further, it doesn’t appear that RegExp.@@matchAll is supposed to be used the way the MDN article shows it’s used. Rather it’s just making RegExp conform to the iterator protocol so that it can be used with String.matchAll

I’d edit both myself but I’m not 100% I’m qualified

1 Like