Skip to content

Commit 584a5d2

Browse files
committed
merging all conflicts
2 parents b9b3366 + 6ab384f commit 584a5d2

File tree

19 files changed

+41
-29
lines changed

19 files changed

+41
-29
lines changed

1-js/01-getting-started/4-devtools/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ Abychom viděli chyby a získali spoustu dalších užitečných informací o sk
88

99
Většina vývojářů tíhne k vývoji v Chrome nebo Firefoxu, protože mají vyhlášené vývojářské nástroje. Jiné prohlížeče rovněž poskytují vývojářské nástroje, někdy se speciálními vlastnostmi, ale obvykle jen „dohánějí“ Chrome nebo Firefox. Většina vývojářů tedy má svůj „oblíbený“ prohlížeč a k jinému se uchýlí jen tehdy, řeší-li problém specifický pro určitý prohlížeč.
1010

11+
<<<<<<< HEAD
1112
<<<<<<< HEAD
1213
Vývojářské nástroje jsou silné a mají mnoho funkcí. Pro začátek se naučíme, jak je otevřít, podívat se na chyby a spustit v nich příkazy JavaScriptu.
1314
=======
1415
Developer tools are potent, they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
1516
>>>>>>> 99e59ba611ab11319ef9d0d66734b0bea2c3f058
17+
=======
18+
Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
19+
>>>>>>> 6ab384f2512902d74e4b0ff5a6be60e48ab52e96
1620
1721
## Google Chrome
1822

1-js/02-first-steps/15-function-basics/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ Functions that are used *very often* sometimes have ultrashort names.
411411

412412
For example, the [jQuery](http://jquery.com) framework defines a function with `$`. The [Lodash](http://lodash.com/) library has its core function named `_`.
413413

414-
These are exceptions. Generally functions names should be concise and descriptive.
414+
These are exceptions. Generally function names should be concise and descriptive.
415415
```
416416

417417
## Functions == Comments

1-js/03-code-quality/05-testing-mocha/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Automated testing will be used in further tasks, and it's also widely used in real projects.
44

5-
## Why we need tests?
5+
## Why do we need tests?
66

77
When we write a function, we can usually imagine what it should do: which parameters give which results.
88

1-js/03-code-quality/06-polyfills/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Modern project build systems, such as [webpack](http://webpack.github.io/), prov
4848
4949
New language features may include not only syntax constructs and operators, but also built-in functions.
5050
51-
For example, `Math.trunc(n)` is a function that "cuts off" the decimal part of a number, e.g `Math.trunc(1.23) = 1`.
51+
For example, `Math.trunc(n)` is a function that "cuts off" the decimal part of a number, e.g `Math.trunc(1.23)` returns `1`.
5252
5353
In some (very outdated) JavaScript engines, there's no `Math.trunc`, so such code will fail.
5454

1-js/04-object-basics/04-object-methods/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ user = {
8181
// method shorthand looks better, right?
8282
user = {
8383
*!*
84-
sayHi() { // same as "sayHi: function()"
84+
sayHi() { // same as "sayHi: function(){...}"
8585
*/!*
8686
alert("Hello");
8787
}

1-js/05-data-types/08-weakmap-weakset/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WeakMap and WeakSet
22

3-
As we know from the chapter <info:garbage-collection>, JavaScript engine stores a value in memory while it is reachable (and can potentially be used).
3+
As we know from the chapter <info:garbage-collection>, JavaScript engine keeps a value in memory while it is "reachable" and can potentially be used.
44

55
For instance:
66
```js

1-js/05-data-types/09-keys-values-entries/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ let doublePrices = Object.fromEntries(
9999
alert(doublePrices.meat); // 8
100100
```
101101

102-
It may look difficult from the first sight, but becomes easy to understand after you use it once or twice. We can make powerful chains of transforms this way.
102+
It may look difficult at first sight, but becomes easy to understand after you use it once or twice. We can make powerful chains of transforms this way.

1-js/11-async/02-promise-basics/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Its arguments `resolve` and `reject` are callbacks provided by JavaScript itself
2828

2929
When the executor obtains the result, be it soon or late, doesn't matter, it should call one of these callbacks:
3030

31-
- `resolve(value)` — if the job finished successfully, with result `value`.
32-
- `reject(error)` — if an error occurred, `error` is the error object.
31+
- `resolve(value)` — if the job is finished successfully, with result `value`.
32+
- `reject(error)` — if an error has occurred, `error` is the error object.
3333

34-
So to summarize: the executor runs automatically and attempts to perform a job. When it is finished with the attempt it calls `resolve` if it was successful or `reject` if there was an error.
34+
So to summarize: the executor runs automatically and attempts to perform a job. When it is finished with the attempt, it calls `resolve` if it was successful or `reject` if there was an error.
3535

3636
The `promise` object returned by the `new Promise` constructor has these internal properties:
3737

1-js/11-async/07-microtask-queue/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ As stated in the [specification](https://tc39.github.io/ecma262/#sec-jobs-and-jo
3030
- The queue is first-in-first-out: tasks enqueued first are run first.
3131
- Execution of a task is initiated only when nothing else is running.
3232

33-
Or, to say more simply, when a promise is ready, its `.then/catch/finally` handlers are put into the queue; they are not executed yet. When the JavaScript engine becomes free from the current code, it takes a task from the queue and executes it.
33+
Or, to put it more simply, when a promise is ready, its `.then/catch/finally` handlers are put into the queue; they are not executed yet. When the JavaScript engine becomes free from the current code, it takes a task from the queue and executes it.
3434

3535
That's why "code finished" in the example above shows first.
3636

@@ -40,7 +40,7 @@ Promise handlers always go through this internal queue.
4040

4141
If there's a chain with multiple `.then/catch/finally`, then every one of them is executed asynchronously. That is, it first gets queued, then executed when the current code is complete and previously queued handlers are finished.
4242

43-
**What if the order matters for us? How can we make `code finished` run after `promise done`?**
43+
**What if the order matters for us? How can we make `code finished` appear after `promise done`?**
4444

4545
Easy, just put it into the queue with `.then`:
4646

1-js/12-generators-iterators/2-async-iterators-generators/article.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ An example of use (shows commit authors in console):
384384
}
385385

386386
})();
387+
388+
// Note: If you are running this in an external sandbox, you'll need to paste here the function fetchCommits described above
387389
```
388390

389391
That's just what we wanted.

0 commit comments

Comments
 (0)