From 203b8f9f076f18cc9918a01f2bc3e2fd6bfec04a Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 22 Apr 2019 17:52:49 +0300 Subject: [PATCH] fixes --- 1-js/09-classes/02-class-inheritance/article.md | 2 +- .../2-async-iterators-generators/article.md | 4 ++-- 5-network/01-fetch-basics/article.md | 6 +++--- 5-network/02-fetch-progress/article.md | 2 +- README.md | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/1-js/09-classes/02-class-inheritance/article.md b/1-js/09-classes/02-class-inheritance/article.md index 2a482143..efe83810 100644 --- a/1-js/09-classes/02-class-inheritance/article.md +++ b/1-js/09-classes/02-class-inheritance/article.md @@ -30,7 +30,7 @@ let animal = new Animal("My animal"); ...And `Rabbit`: ```js -class Rabbit extends Animal { +class Rabbit { constructor(name) { this.name = name; } 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 7b59fd5c..ab99a57c 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 @@ -273,7 +273,7 @@ The pattern is very common, it's not about users, but just about anything. For i What we'd like to have is an iterable source of commits, so that we could use it like this: ```js -let repo = 'iliakan/javascript-tutorial-en'; // Github repository to get commits from +let repo = 'javascript-tutorial/en.javascript.info'; // Github repository to get commits from for await (let commit of fetchCommits(repo)) { // process commit @@ -320,7 +320,7 @@ An example of use (shows commit authors in console): let count = 0; - for await (const commit of fetchCommits('iliakan/javascript-tutorial-en')) { + for await (const commit of fetchCommits('javascript-tutorial/en.javascript.info')) { console.log(commit.author.login); diff --git a/5-network/01-fetch-basics/article.md b/5-network/01-fetch-basics/article.md index ab1765b2..7d56ab2c 100644 --- a/5-network/01-fetch-basics/article.md +++ b/5-network/01-fetch-basics/article.md @@ -57,7 +57,7 @@ To get the response body, we need to use an additional method call. For instance, here we get a JSON-object with latest commits from Github: ```js run async -let response = await fetch('https://api.github.com/repos/iliakan/javascript-tutorial-en/commits'); +let response = await fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits'); *!* let commits = await response.json(); // read response body and parse as JSON @@ -69,7 +69,7 @@ alert(commits[0].author.login); Or, the same using pure promises syntax: ```js run -fetch('https://api.github.com/repos/iliakan/javascript-tutorial-en/commits') +fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits') .then(response => response.json()) .then(commits => alert(commits[0].author.login)); ``` @@ -119,7 +119,7 @@ There's a Map-like headers object in `response.headers`. We can get individual headers or iterate over them: ```js run async -let response = await fetch('https://api.github.com/repos/iliakan/javascript-tutorial-en/commits'); +let response = await fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits'); // get one header alert(response.headers.get('Content-Type')); // application/json; charset=utf-8 diff --git a/5-network/02-fetch-progress/article.md b/5-network/02-fetch-progress/article.md index bc6efb0d..e7e945f6 100644 --- a/5-network/02-fetch-progress/article.md +++ b/5-network/02-fetch-progress/article.md @@ -39,7 +39,7 @@ Here's the full code to get response and log the progress, more explanations fol ```js run async // Step 1: start the fetch and obtain a reader -let response = await fetch('https://api.github.com/repos/iliakan/javascript-tutorial-en/commits?per_page=100'); +let response = await fetch('https://api.github.com/repos/javascript-tutorial/en.javascript.info/commits?per_page=100'); const reader = response.body.getReader(); diff --git a/README.md b/README.md index bdf600ee..e475fce3 100755 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ See for the details. ## Contributions -We'd also like to collaborate on the tutorial with other people. +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 👏 -**You can edit the text in any editor.** The tutorial uses enhanced "markdown" format, easy to grasp. And if you want to see how it looks on-site, there's a server to run the tutorial locally at . +**You can edit the text in any editor.** The tutorial uses enhanced "markdown" format, easy to grasp. And if you want to see how it looks on-site, there's a server to run the tutorial locally at . The list of contributors is available at . @@ -36,4 +36,4 @@ It's very easy to add something new. --- 💓 -Ilya Kantor +Ilya Kantor @iliakan