Merge pull request #1796 from HynekS/fix-lang-and-typo

fix: 2 stray lines of russian and a typo
This commit is contained in:
Ilya Kantor 2020-03-21 10:59:23 +03:00 committed by GitHub
commit 3086efea77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,8 +218,8 @@ let results = '<h1> <h2>'.matchAll(/<(.*?)>/gi);
for(let result of results) { for(let result of results) {
alert(result); alert(result);
// первый вывод: <h1>,h1 // first alert: <h1>,h1
// второй: <h2>,h2 // second: <h2>,h2
} }
``` ```
@ -249,7 +249,7 @@ The call to `matchAll` does not perform the search. Instead, it returns an itera
So, there will be found as many results as needed, not more. So, there will be found as many results as needed, not more.
E.g. there are potentially 100 matches in the text, but in a `for..of` loop we found 5 of them, then decided it's enough and make a `break`. Then the engine won't spend time finding other 95 mathces. E.g. there are potentially 100 matches in the text, but in a `for..of` loop we found 5 of them, then decided it's enough and make a `break`. Then the engine won't spend time finding other 95 matches.
``` ```
## Named groups ## Named groups