diff --git a/1-js/12-generators-iterators/2-async-iterators-generators/article.md b/1-js/12-generators-iterators/2-async-iterators-generators/article.md index ad393677d5..7b59fd5c6d 100644 --- a/1-js/12-generators-iterators/2-async-iterators-generators/article.md +++ b/1-js/12-generators-iterators/2-async-iterators-generators/article.md @@ -1,5 +1,5 @@ -# Async iteration and generators +# Async iterators and generators Asynchronous iterators allow to iterate over data that comes asynchronously, on-demand. diff --git a/9-regular-expressions/01-regexp-introduction/article.md b/9-regular-expressions/01-regexp-introduction/article.md index 571beecb44..59775d3c0a 100644 --- a/9-regular-expressions/01-regexp-introduction/article.md +++ b/9-regular-expressions/01-regexp-introduction/article.md @@ -65,18 +65,18 @@ From here on the color scheme is: ````smart header="When to use `new RegExp`?" -Normally we use the short syntax `/.../`. But it does not allow any variable insertions, so we must know the exact regexp at the time of writing the code. +Normally we use the short syntax `/.../`. But it does not support variable insertions `${...}`. -On the other hand, `new RegExp` allows to construct a pattern dynamically from a string. +On the other hand, `new RegExp` allows to construct a pattern dynamically from a string, so it's more flexible. -So we can figure out what we need to search and create `new RegExp` from it: +Here's an example of a dynamically generated regexp: ```js run -let search = prompt("What you want to search?", "love"); -let regexp = new RegExp(search); +let tag = prompt("Which tag you want to search?", "h2"); +let regexp = new RegExp(`<${tag}>`); -// find whatever the user wants -alert( "I love JavaScript".search(regexp)); +// finds

by default +alert( "

".search(regexp)); ``` ```` diff --git a/README.md b/README.md index 0bef179f2c..14d3a4d71f 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ +<<<<<<< HEAD # The Modern JavaScript Tutorial in Korean This repository hosts the translation of in Korean. +======= +# The Modern JavaScript Tutorial + +This repository hosts the English content of the Modern JavaScript Tutorial, published at [https://javascript.info](https://javascript.info). +>>>>>>> 069795438d355d7088f22470cfa6529149e11af7 Please help us to make the translation better. @@ -9,6 +15,7 @@ Please help us to make the translation better. - Add a comment to that issue to inform the maintainer that you're translating it. - Fork the repository, translate and send a PR when done. +<<<<<<< HEAD 🎉 Thank you! Your name and the contribution size will appear in the "About project" page when the translation gets published. @@ -18,9 +25,19 @@ P.S. The full list of languages can be found at for the details. + +## Contributions + +We'd also like to collaborate on the tutorial with other people. + +Something's wrong? A topic is missing? Explain it to people, add as PR 👏 +>>>>>>> 069795438d355d7088f22470cfa6529149e11af7 The folder is named `N-url`, where `N` – is the number for sorting (articles are ordered), and `url` is the URL-slug on the site. +<<<<<<< HEAD The folder has one of files: - `index.md` for a section, @@ -87,6 +104,11 @@ Example: ``` For links to MDN, that are only partially translated, also use the language-specific version. +======= +The list of contributors is available at . + +## Structure +>>>>>>> 069795438d355d7088f22470cfa6529149e11af7 If a linked article has no translated version, leave the link "as is". @@ -95,4 +117,14 @@ If a linked article has no translated version, leave the link "as is". You can run the tutorial locally, to immediately see the changes on-site. +<<<<<<< HEAD The server is at . +======= +Each of these files starts from the `# Main header`. + +It's very easy to add something new. + +--- +💓 +Ilya Kantor +>>>>>>> 069795438d355d7088f22470cfa6529149e11af7