Skip to content

Commit f423a00

Browse files
authored
Merge pull request #3 from iliakan/master
Update repo 04-Sept-2018
2 parents 85be7a5 + dac2e71 commit f423a00

File tree

12 files changed

+15
-16
lines changed

12 files changed

+15
-16
lines changed

Diff for: 1-js/02-first-steps/01-hello-world/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Comments before and after scripts.
6161
//--></script>
6262
```
6363

64-
These comments were supposed to hide the code from an old browser that didn't know about a `<script>` tag. But all browsers born in the past 15+ years don't have any issues. We mention it here, because such comments serve as a sign. If you see that somewhere -- that code is probably really old and not worth looking into.
64+
This trick isn't used in modern JavaScript. These comments were used to hide the JavaScript code from old browsers that didn't know about a `<script>` tag. Since browsers born in the last 15 years don't have this issue, this kind of comment can help you identify really old code.
6565

6666

6767
## External scripts

Diff for: 1-js/02-first-steps/08-comparison/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Yeah, mathematically that's strange. The last result states that "`null` is grea
176176

177177
The reason is that an equality check `==` and comparisons `> < >= <=` work differently. Comparisons convert `null` to a number, hence treat it as `0`. That's why (3) `null >= 0` is true and (1) `null > 0` is false.
178178

179-
On the other hand, the equality check `==` for `undefined` and `null` works by the rule, without any conversions. They equal each other and don't equal anything else. That's why (2) `null == 0` is false.
179+
On the other hand, the equality check `==` for `undefined` and `null` is defined such that, without any conversions, they equal each other and don't equal anything else. That's why (2) `null == 0` is false.
180180

181181
### An incomparable undefined
182182

Diff for: 1-js/03-code-quality/03-comments/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Any subtle features of the code? Where they are used?
162162

163163
## Summary
164164

165-
An important sign of a good developer is comments: their presence and even their absense.
165+
An important sign of a good developer is comments: their presence and even their absence.
166166

167167
Good comments allow us to maintain the code well, come back to it after a delay and use it more effectively.
168168

Diff for: 1-js/05-data-types/05-array-methods/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ alert(arr); // *!*1, 2, 15*/!*
417417
````
418418

419419
````smart header="Arrow functions for the best"
420-
Remember [arrow functions](info:function-expression#arrow-functions)? We can use them here for neater sorting:
420+
Remember [arrow functions](info:function-expressions-arrows#arrow-functions)? We can use them here for neater sorting:
421421
422422
```js
423423
arr.sort( (a, b) => a - b );

Diff for: 1-js/06-advanced-functions/03-closure/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The execution flow of the code above:
175175

176176
1. The global Lexical Environment has `name: "John"`.
177177
2. At the line `(*)` the global variable is changed, now it has `name: "Pete"`.
178-
3. When the function `say()`, is executed and takes `name` from outside. Here that's from the global Lexical Environment where it's already `"Pete"`.
178+
3. When the function `sayHi()`, is executed and takes `name` from outside. Here that's from the global Lexical Environment where it's already `"Pete"`.
179179

180180

181181
```smart header="One call -- one Lexical Environment"

Diff for: 1-js/06-advanced-functions/08-settimeout-setinterval/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ We do a part of the job `(*)`:
319319
2. Second run: `i=1000001..2000000`.
320320
3. ...and so on, the `while` checks if `i` is evenly divided by `1000000`.
321321

322-
Then the next call is scheduled in `(*)` if we're not done yet.
322+
Then the next call is scheduled in `(**)` if we're not done yet.
323323

324324
Pauses between `count` executions provide just enough "breath" for the JavaScript engine to do something else, to react to other user actions.
325325

Diff for: 2-ui/3-event-details/10-onload-ondomcontentloaded/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For instance:
4343
<img id="img" src="https://en.js.cx/clipart/train.gif?speed=1&cache=0">
4444
```
4545

46-
In the example the `DOMContentLoaded` handler runs when the document is loaded, not waits for the page load. So `alert` shows zero sizes.
46+
In the example the `DOMContentLoaded` handler runs when the document is loaded and does not wait for the image to load. So `alert` shows zero sizes.
4747

4848
At the first sight `DOMContentLoaded` event is very simple. The DOM tree is ready -- here's the event. But there are few peculiarities.
4949

Diff for: 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Here's the full example with all details:
169169
170170
[codetabs height=380 src="mouseenter-mouseleave-delegation-2"]
171171
172-
Try to move the cursor in and out of table cells and inside them. Fast or slow -- doesn't better. Only `<td>` as a whole is highlighted unlike the example before.
172+
Try to move the cursor in and out of table cells and inside them. Fast or slow -- doesn't matter. Only `<td>` as a whole is highlighted unlike the example before.
173173
```
174174

175175

Diff for: 2-ui/4-forms-controls/1-form-elements/1-add-select-option/solution.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ The solution, step by step:
88

99
<script>
1010
// 1)
11-
let selectedOption = genres.options[select.selectedIndex];
11+
let selectedOption = genres.options[genres.selectedIndex];
1212
alert( selectedOption.value );
1313
1414
// 2)
15-
let newOption = new Option("classic", "Classic");
16-
select.append(newOption);
15+
let newOption = new Option("Classic", "classic");
16+
genres.append(newOption);
1717
1818
// 3)
1919
newOption.selected = true;

Diff for: 6-async/02-promise-basics/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The properties `state` and `result` of the Promise object are internal. We can't
123123
124124
## Consumers: "then" and "catch"
125125
126-
A Promise object serves as a link between the executor (the "producing code" or "singer) and the consuming functions (the "fans"), which will receive the result or error. Consuming functions can be registered (subscribed) using the methods `.then` and `.catch`.
126+
A Promise object serves as a link between the executor (the "producing code" or "singer") and the consuming functions (the "fans"), which will receive the result or error. Consuming functions can be registered (subscribed) using the methods `.then` and `.catch`.
127127
128128
The syntax of `.then` is:
129129

Diff for: 6-async/05-async-await/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Async/await
22

3-
There's a special syntax to work with promises in a more comfort fashion, called "async/await". It's surprisingly easy to understand and use.
3+
There's a special syntax to work with promises in a more comfortable fashion, called "async/await". It's surprisingly easy to understand and use.
44

55
## Async functions
66

Diff for: README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ This repository hosts the content of the Modern JavaScript Tutorial, published a
1010
|----------|--------|-------------------|-----------------|-----------|
1111
| Chinese | https://github.com/xitu/javascript-tutorial-zh | @leviding | ![](http://translate-hook.javascript.info/stats/zh.svg) | - |
1212
| Danish | https://github.com/ockley/javascript-tutorial-da | @ockey | ![](http://translate-hook.javascript.info/stats/da.svg) | - |
13-
| French | https://github.com/SugoiNelson/javascript-tutorial-fr | @SugoiNelson | ![](http://translate-hook.javascript.info/stats/fr.svg) | - |
1413
| German | https://github.com/MartinEls/javascript-tutorial-de | @MartilEls | ![](http://translate-hook.javascript.info/stats/de.svg) | - |
1514
| Japanese | https://github.com/KenjiI/javascript-tutorial-ja | @KenjiI | ![](http://translate-hook.javascript.info/stats/ja.svg) | - |
16-
| Russian | https://github.com/iliakan/javascript-tutorial-ru | @iliakan | | https://learn.javascript.ru |
15+
| Persian | https://github.com/Goudarz/javascript-tutorial-fa | @Goudarz | ![](http://translate-hook.javascript.info/stats/fa.svg) | - |
16+
| Russian | https://github.com/iliakan/javascript-tutorial-ru | @iliakan | | https://learn.javascript.ru |
1717
| Turkish | https://github.com/sahinyanlik/javascript-tutorial-tr | @sahinyanlik | ![](http://translate-hook.javascript.info/stats/tr.svg) | - |
18-
| Uzbek | https://github.com/aruzikulov/javascript-tutorial-uz | @aruzikulov | ![](http://translate-hook.javascript.info/stats/uz.svg) | - |
1918

2019
If you'd like to translate it into your language, please clone the repository, change its name to `javascript-tutorial-...` (by the language) and [create an issue](https://github.com/iliakan/javascript-tutoria-en/issues/new) for me to add you to the list.
2120

0 commit comments

Comments
 (0)