- searches for a string in another string
can also search using a regexp
- also searches using a regexp
- the regexp MUST use the global flag /g
- finds any number of occurrences
- finds all matches, of all capture groups
returns an iterator
- the iterator has a key
- the result can be looped over using for-of
The repository where the proposal was worked on, some interesting details in there about naming and the process of how this became a standard.
The Mozilla Developer Network docs, contains good examples.