Skip to content

Commit a91759c

Browse files
committed
merging all conflicts
2 parents bf2804a + 7964b11 commit a91759c

File tree

35 files changed

+256
-98
lines changed

35 files changed

+256
-98
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,21 @@ Moderní nástroje provádějí transpilaci velmi rychle a čistě. V podstatě
106106

107107
Příklady takových jazyků:
108108

109+
<<<<<<< HEAD
109110
- [CoffeeScript](http://coffeescript.org/) je „syntaktický cukr“ pro JavaScript, který zavádí kratší syntaxi a tím nám umožňuje psát čistší a přesnější kód. Obvykle jej mají v oblibě vývojáři, kteří používají jazyk Ruby.
110111
- [TypeScript](http://www.typescriptlang.org/) se soustředí na přidání „striktního, silně typovaného systému“, aby zjednodušil vývoj a podporu složitých systémů. Vyvinula jej firma Microsoft.
111112
- [Flow](http://flow.org/) rovněž přidává typovací systém, ale jiným způsobem. Vyvinul jej Facebook.
112113
- [Dart](https://www.dartlang.org/) je samostatný jazyk se svým vlastním enginem, který běží v prostředích mimo prohlížeč (např. v mobilních aplikacích), ale i ten může být transpilován do JavaScriptu. Vyvinut firmou Google.
113114
- [Brython](https://brython.info/) je transpiler Pythonu do JavaScriptu, který umožňuje psát aplikace v čistém Pythonu bez JavaScriptu.
114115
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) je moderní, stručný a bezpečný programovací jazyk, jehož cílem může být prohlížeč nebo Node.
116+
=======
117+
- [CoffeeScript](https://coffeescript.org/) is a "syntactic sugar" for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it.
118+
- [TypeScript](https://www.typescriptlang.org/) is concentrated on adding "strict data typing" to simplify the development and support of complex systems. It is developed by Microsoft.
119+
- [Flow](https://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
120+
- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google.
121+
- [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
122+
- [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node.
123+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
115124
116125
Jsou i další. Samozřejmě i když používáme některý z transpilovaných jazyků, měli bychom znát i JavaScript, abychom skutečně porozuměli tomu, co se děje.
117126

1-js/01-getting-started/2-manuals-specifications/article.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ Pokud vyvíjíte pro prohlížeč, existují i další specifikace uvedené ve [
3131

3232
JavaScript je neustále vyvíjen a pravidelně se do něj přidávají nové vlastnosti.
3333

34+
<<<<<<< HEAD
3435
Chcete-li vědět, v jakých enginech jsou tyto vlastnosti už podporovány, podívejte se na:
36+
=======
37+
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <http://caniuse.com/#feat=cryptography>.
38+
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
39+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
3540
3641
- <http://caniuse.com> - pro každou vlastnost obsahuje tabulku enginů, které ji podporují, např. chcete-li vidět, které enginy podporují moderní kryptografické funkce, jděte na <http://caniuse.com/#feat=cryptography>.
3742
- <https://kangax.github.io/compat-table> - tabulka vlastností jazyka a enginů, které je podporují nebo nepodporují.

1-js/01-getting-started/3-code-editors/article.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ IDE načítá projekt (který se může skládat z mnoha souborů), umožňuje n
1212

1313
Pokud jste si IDE ještě nevybrali, zvažte následující možnosti:
1414

15+
<<<<<<< HEAD
1516
- [Visual Studio Code](https://code.visualstudio.com/) (různé platformy, zdarma).
1617
- [WebStorm](http://www.jetbrains.com/webstorm/) (různé platformy, placené).
18+
=======
19+
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
20+
- [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid).
21+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
1722
1823
Pro Windows existuje také „Visual Studio“ (nezaměňovat s „Visual Studio Code“), což je placený, ale silný editor pouze pro Windows, velmi vhodný pro platformu .NET, který funguje dobře i pro JavaScript. Má i neplacenou verzi [Visual Studio Community](https://www.visualstudio.com/vs/community/).
1924

1-js/02-first-steps/04-variables/article.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ let věk = 25;
6363
let zpráva = 'Ahoj';
6464
```
6565

66+
<<<<<<< HEAD
6667
Někteří lidé definují více proměnných i tímto víceřádkovým stylem:
68+
=======
69+
Some people also define multiple variables in this multiline style:
70+
71+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
6772
```js no-beautify
6873
let uživatel = 'Jan',
6974
věk = 25,
@@ -102,7 +107,12 @@ Například proměnnou `zpráva` si můžeme představit jako krabičku se ští
102107
103108
Do krabičky můžeme uložit libovolnou hodnotu.
104109
110+
<<<<<<< HEAD
105111
Můžeme ji také změnit tolikrát, kolikrát chceme:
112+
=======
113+
We can also change it as many times as we want:
114+
115+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
106116
```js run
107117
let zpráva;
108118
@@ -260,8 +270,12 @@ mojeDatumNarození = '01.01.2001'; // chyba, nelze změnit konstantu!
260270
261271
Když má programátor jistotu, že hodnota proměnné se nikdy nezmění, může ji deklarovat pomocí `const`, aby tuto skutečnost pojistil a všem jasně sdělil.
262272
273+
<<<<<<< HEAD
263274
264275
### Konstanty velkými písmeny
276+
=======
277+
### Uppercase constants
278+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
265279
266280
Je široce rozšířenou praktikou používat konstanty jako názvy obtížně zapamatovatelných hodnot, které jsou známy ještě před spuštěním programu.
267281
@@ -290,7 +304,12 @@ Kdy bychom měli používat pro konstantu velká písmena a kdy bychom ji měli
290304
291305
Být „konstanta“ znamená prostě to, že hodnota proměnné se nikdy nezmění. Existují však konstanty, které jsou známy již před spuštěním programu (například hexadecimální hodnota červené barvy), a pak jsou konstanty, které se *vypočítají* až za běhu programu, ale jejich vypočtená hodnota se nikdy nezmění.
292306
307+
<<<<<<< HEAD
293308
Příklad:
309+
=======
310+
For instance:
311+
312+
>>>>>>> 7964b11b8fa2c314d9a09a82ea4b585cda618c80
294313
```js
295314
const dobaNačítáníStránky = /* doba, kterou trvá načíst webovou stránku */;
296315
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The answer: `null`, because it's the first falsy value from the list.
22

33
```js run
4-
alert( 1 && null && 2 );
4+
alert(1 && null && 2);
55
```
66

1-js/02-first-steps/13-while-for/article.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ For example, outputting goods from a list one after another or just running the
66

77
*Loops* are a way to repeat the same code multiple times.
88

9+
```smart header="The for..of and for..in loops"
10+
A small announcement for advanced readers.
11+
12+
This article covers only basic loops: `while`, `do..while` and `for(..;..;..)`.
13+
14+
If you came to this article searching for other types of loops, here are the pointers:
15+
16+
- See [for..in](info:object#forin) to loop over object properties.
17+
- See [for..of](info:array#loops) and [iterables](info:iterable) for looping over arrays and iterable objects.
18+
19+
Otherwise, please read on.
20+
```
21+
922
## The "while" loop
1023

1124
The `while` loop has the following syntax:
@@ -162,10 +175,8 @@ for (i = 0; i < 3; i++) { // use an existing variable
162175
163176
alert(i); // 3, visible, because declared outside of the loop
164177
```
165-
166178
````
167179

168-
169180
### Skipping parts
170181

171182
Any part of `for` can be skipped.
@@ -286,7 +297,6 @@ if (i > 5) {
286297
287298
...and rewrite it using a question mark:
288299
289-
290300
```js no-beautify
291301
(i > 5) ? alert(i) : *!*continue*/!*; // continue isn't allowed here
292302
```
@@ -321,6 +331,7 @@ We need a way to stop the process if the user cancels the input.
321331
The ordinary `break` after `input` would only break the inner loop. That's not sufficient -- labels, come to the rescue!
322332

323333
A *label* is an identifier with a colon before a loop:
334+
324335
```js
325336
labelName: for (...) {
326337
...
@@ -342,6 +353,7 @@ The `break <labelName>` statement in the loop below breaks out to the label:
342353
// do something with the value...
343354
}
344355
}
356+
345357
alert('Done!');
346358
```
347359

@@ -362,13 +374,15 @@ The `continue` directive can also be used with a label. In this case, code execu
362374
Labels do not allow us to jump into an arbitrary place in the code.
363375
364376
For example, it is impossible to do this:
377+
365378
```js
366379
break label; // jump to the label below (doesn't work)
367380
368381
label: for (...)
369382
```
370383
371384
A `break` directive must be inside a code block. Technically, any labelled code block will do, e.g.:
385+
372386
```js
373387
label: {
374388
// ...

1-js/03-code-quality/03-comments/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Such comments allow us to understand the purpose of the function and use it the
143143

144144
By the way, many editors like [WebStorm](https://www.jetbrains.com/webstorm/) can understand them as well and use them to provide autocomplete and some automatic code-checking.
145145

146-
Also, there are tools like [JSDoc 3](https://github.com/jsdoc3/jsdoc) that can generate HTML-documentation from the comments. You can read more information about JSDoc at <https://jsdoc.app>.
146+
Also, there are tools like [JSDoc 3](https://github.com/jsdoc/jsdoc) that can generate HTML-documentation from the comments. You can read more information about JSDoc at <https://jsdoc.app>.
147147

148148
Why is the task solved this way?
149149
: What's written is important. But what's *not* written may be even more important to understand what's going on. Why is the task solved exactly this way? The code gives no answer.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ In the code above, the property `obj.test` technically exists. So the `in` opera
355355
Situations like this happen very rarely, because `undefined` should not be explicitly assigned. We mostly use `null` for "unknown" or "empty" values. So the `in` operator is an exotic guest in the code.
356356
357357
358-
## The "for..in" loop
358+
## The "for..in" loop [#forin]
359359
360360
To walk over all keys of an object, there exists a special form of the loop: `for..in`. This is a completely different thing from the `for(;;)` construct that we studied before.
361361

1-js/04-object-basics/03-garbage-collection/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ The first step marks the roots:
169169

170170
![](garbage-collection-2.svg)
171171

172-
Then we follow their references are mark referenced objects:
172+
Then we follow their references and mark referenced objects:
173173

174174
![](garbage-collection-3.svg)
175175

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ user = {
9090

9191
As demonstrated, we can omit `"function"` and just write `sayHi()`.
9292

93-
To tell the truth, the notations are not fully identical. There are subtle differences related to object inheritance (to be covered later), but for now they do not matter. In almost all cases the shorter syntax is preferred.
93+
To tell the truth, the notations are not fully identical. There are subtle differences related to object inheritance (to be covered later), but for now they do not matter. In almost all cases, the shorter syntax is preferred.
9494

9595
## "this" in methods
9696

0 commit comments

Comments
 (0)