Update article.md

This commit is contained in:
Ahmed Elaguab 2021-05-28 16:53:44 +01:00 committed by GitHub
parent cf33b67042
commit f8313dc936
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ There are 3 differences from `match`:
1. It returns an iterable object with matches instead of an array. We can make a regular array from it using `Array.from`. 1. It returns an iterable object with matches instead of an array. We can make a regular array from it using `Array.from`.
2. Every match is returned as an array with capturing groups (the same format as `str.match` without flag `pattern:g`). 2. Every match is returned as an array with capturing groups (the same format as `str.match` without flag `pattern:g`).
3. If there are no results, it returns not `null`, but an empty iterable object. 3. If there are no results, it returns an empty iterable object instead of `null`.
Usage example: Usage example: