Skip to content

Commit e55ac2b

Browse files
authored
Merge pull request #53 from javascript-tutorial/sync-e2f9e584
Sync with upstream @ e2f9e58
2 parents ccd5b75 + af268b9 commit e55ac2b

File tree

9 files changed

+27
-8
lines changed

9 files changed

+27
-8
lines changed

1-js/02-first-steps/08-operators/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ Následuje výtažek z [tabulky priorit](https://developer.mozilla.org/en-US/doc
204204
| 2 | přiřazení | `=` |
205205
| ... | ... | ... |
206206

207+
<<<<<<< HEAD
207208
Jak vidíme, „unární plus“ má prioritu `15`, která je vyšší než priorita `13` „sčítání“ (binární plus). To je důvod, proč se ve výrazu `"+jablka + +pomeranče"` unární plusy vyhodnotí před sčítáním.
209+
=======
210+
As we can see, the "unary plus" has a priority of `15` which is higher than the `12` of "addition" (binary plus). That's why, in the expression `"+apples + +oranges"`, unary pluses work before the addition.
211+
>>>>>>> e2f9e5840737e00846bfd492192d8a3828820c60
208212
209213
## Přiřazení
210214

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ Vývojář si obvykle spustí transpiler na svém vlastním počítači a pak um
4242
4343
Když hovoříme o názvech, jedním z nejvýznamnějších transpilerů je [Babel](https://babeljs.io).
4444
45+
<<<<<<< HEAD
4546
Moderní systémy pro vytváření projektů, například [webpack](http://webpack.github.io/), poskytují způsoby, jak spouštět transpiler automaticky při každé změně kódu, takže je velmi jednoduché jej integrovat do procesu vývoje.
47+
=======
48+
Modern project build systems, such as [webpack](https://webpack.js.org/), provide means to run transpiler automatically on every code change, so it's very easy to integrate into development process.
49+
>>>>>>> e2f9e5840737e00846bfd492192d8a3828820c60
4650
4751
## Polyfilly
4852
@@ -82,7 +86,11 @@ V této kapitole jsme vás chtěli motivovat k prostudování moderních vlastno
8286
8387
Jen nezapomínejte používat transpiler (používáte-li moderní syntaxi nebo operátory) a polyfilly (abyste přidali funkce, které mohou chybět). Ty zajistí, že váš kód bude fungovat.
8488
89+
<<<<<<< HEAD
8590
Například později, až budete JavaScript dobře znát, si můžete nastavit systém pro vytváření kódu založený na [webpacku](http://webpack.github.io/) s pluginem [babel-loader](https://github.com/babel/babel-loader).
91+
=======
92+
For example, later when you're familiar with JavaScript, you can setup a code build system based on [webpack](https://webpack.js.org/) with [babel-loader](https://github.com/babel/babel-loader) plugin.
93+
>>>>>>> e2f9e5840737e00846bfd492192d8a3828820c60
8694
8795
Dobré zdroje, které ukazují aktuální stav podpory různých vlastností:
8896
- <https://kangax.github.io/compat-table/es6/> - pro čistý JavaScript.

1-js/05-data-types/05-array-methods/3-filter-range-in-place/_js.view/test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ describe("filtrujPodleRozsahuNaMístě", function() {
44

55
let pole = [5, 3, 8, 1];
66

7+
<<<<<<< HEAD
78
filtrujPodleRozsahuNaMístě(pole, 1, 4);
89

910
assert.deepEqual(pole, [3, 1]);
11+
=======
12+
filterRangeInPlace(arr, 2, 5);
13+
14+
assert.deepEqual(arr, [5, 3]);
15+
>>>>>>> e2f9e5840737e00846bfd492192d8a3828820c60
1016
});
1117

1218
it("nic nevrací", function() {
1319
assert.isUndefined(filtrujPodleRozsahuNaMístě([1,2,3], 1, 4));
1420
});
1521

16-
});
22+
});

1-js/11-async/05-promise-api/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ That's what `Promise.all` is for.
1313
The syntax is:
1414

1515
```js
16-
let promise = Promise.all([...promises...]);
16+
let promise = Promise.all(iterable);
1717
```
1818

19-
`Promise.all` takes an array of promises (it technically can be any iterable, but is usually an array) and returns a new promise.
19+
`Promise.all` takes an iterable (usually, an array of promises) and returns a new promise.
2020

2121
The new promise resolves when all listed promises are resolved, and the array of their results becomes its result.
2222

1-js/13-modules/01-modules-intro/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ alert(admin.name); // Pete
182182

183183
As you can see, when `1.js` changes the `name` property in the imported `admin`, then `2.js` can see the new `admin.name`.
184184

185-
That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other modules will see that.
185+
That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other importers will see that.
186186

187187
**Such behavior is actually very convenient, because it allows us to *configure* modules.**
188188

1-js/13-modules/02-import-export/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ At first sight, "import everything" seems such a cool thing, short to write, why
9393

9494
Well, there are few reasons.
9595

96-
1. Modern build tools ([webpack](http://webpack.github.io) and others) bundle modules together and optimize them to speedup loading and remove unused stuff.
96+
1. Modern build tools ([webpack](https://webpack.js.org/) and others) bundle modules together and optimize them to speedup loading and remove unused stuff.
9797

9898
Let's say, we added a 3rd-party library `say.js` to our project with many functions:
9999
```js
@@ -403,7 +403,7 @@ We can come across two problems with it:
403403

404404
2. `export * from './user.js'` re-exports only named exports, but ignores the default one.
405405

406-
If we'd like to re-export both named and the default export, then two statements are needed:
406+
If we'd like to re-export both named and default exports, then two statements are needed:
407407
```js
408408
export * from './user.js'; // to re-export named exports
409409
export {default} from './user.js'; // to re-export the default export

2-ui/4-forms-controls/1-form-elements/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Let's talk about form controls.
155155
156156
### input and textarea
157157
158-
We can access their value as `input.value` (string) or `input.checked` (boolean) for checkboxes.
158+
We can access their value as `input.value` (string) or `input.checked` (boolean) for checkboxes and radio buttons.
159159
160160
Like this:
161161

4-binary/03-blob/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ blob.arrayBuffer().then(buffer => /* process the ArrayBuffer */);
223223

224224
## From Blob to stream
225225

226-
When we read and write to a blob of more than `2G`, the use of `arrayBuffer` becomes more memory intensive for us. At this point, we can directly convert the blob to a stream.
226+
When we read and write to a blob of more than `2 GB`, the use of `arrayBuffer` becomes more memory intensive for us. At this point, we can directly convert the blob to a stream.
227227

228228
A stream is a special object that allows to read from it (or write into it) portion by portion. It's outside of our scope here, but here's an example, and you can read more at <https://developer.mozilla.org/en-US/docs/Web/API/Streams_API>. Streams are convenient for data that is suitable for processing piece-by-piece.
229229

5-network/11-websocket/demo.view/server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function accept(req, res) {
2121

2222
function onConnect(ws) {
2323
ws.on('message', function (message) {
24+
message = message.toString();
2425
let name = message.match(/([\p{Alpha}\p{M}\p{Nd}\p{Pc}\p{Join_C}]+)$/gu) || "Guest";
2526
ws.send(`Hello from server, ${name}!`);
2627

0 commit comments

Comments
 (0)