Skip to content

Commit f4df1eb

Browse files
committed
merging all conflicts
2 parents 606b916 + 8d9ecb7 commit f4df1eb

File tree

41 files changed

+173
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+173
-127
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,33 @@ Hlavní rozdíl mezi „textovým editorem“ a „IDE“ je, že „IDE“ prac
2929

3030
V praxi mají textové editory obvykle velké množství zásuvných modulů a rozšíření včetně syntaktických analyzátorů a automatického doplňování na adresářové úrovni, takže mezi textovými editory a vývojovými prostředími neexistuje pevně daná hranice.
3131

32+
<<<<<<< HEAD
3233
Vaši pozornost si zasluhují následující možnosti:
3334

3435
- [Sublime Text](http://www.sublimetext.com) (různé platformy, shareware).
3536
- [Notepad++](https://notepad-plus-plus.org/) (Windows, zdarma).
3637
- Také [Vim](http://www.vim.org/) a [Emacs](https://www.gnu.org/software/emacs/) jsou výborné, jestliže je umíte používat.
38+
=======
39+
There are many options, for instance:
40+
41+
- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware).
42+
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
43+
- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
44+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
3745
3846
## Nehádejme se
3947

4048
Ve výše uvedených seznamech jsou zmíněny editory, které já nebo moji přátelé, které považuji za dobré vývojáře, dlouhou dobu používáme a jsme s nimi spokojeni.
4149

4250
Svět je velký a existují v něm i jiné skvělé editory. Vyberte si prosím ten, který se vám nejvíce líbí.
4351

52+
<<<<<<< HEAD
4453
Výběr editoru, stejně jako výběr každého nástroje, je individuální záležitost a závisí na projektech, zvyklostech a osobním vkusu každého vývojáře.
54+
=======
55+
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.
56+
57+
The author's personal opinion:
58+
59+
- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend.
60+
- Otherwise, if it's mostly another language/platform and partially frontend, then consider other editors, such as XCode (Mac), Visual Studio (Windows) or Jetbrains family (Webstorm, PHPStorm, RubyMine etc, depending on the language).
61+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,13 @@ let zpráva = "Tamto"; // Syntaktická chyba: 'zpráva' již byla deklarována
150150
Proměnnou bychom tedy měli deklarovat jen jednou a pak se na ni odkazovat bez použití `let`.
151151
````
152152

153+
<<<<<<< HEAD
153154
```smart header="Funkcionální jazyky"
154155
Stojí za zmínku, že existují [funkcionální](https://cs.wikipedia.org/wiki/Funkcionální_programování) programovací jazyky, například [Scala](http://www.scala-lang.org/) nebo [Erlang](http://www.erlang.org/), které nedovolují měnit hodnotu proměnných.
156+
=======
157+
```smart header="Functional languages"
158+
It's interesting to note that there exist [functional](https://en.wikipedia.org/wiki/Functional_programming) programming languages, like [Scala](https://www.scala-lang.org/) or [Erlang](https://www.erlang.org/) that forbid changing variable values.
159+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
155160
156161
Když je v takových jazycích hodnota jednou uložena „do krabičky“, zůstane tam navždy. Pokud chceme uložit něco jiného, jazyk nás přinutí vytvořit novou krabičku (deklarovat novou proměnnou). Nemůžeme znovu použít starou.
157162
@@ -197,8 +202,13 @@ let moje-jméno; // spojovník '-' není v názvu povolen
197202
Proměnné s názvy `jablko` a `JABLKO` jsou dvě různé proměnné.
198203
```
199204

205+
<<<<<<< HEAD
200206
````smart header="Nelatinská písmena jsou povolena, ale nedoporučují se"
201207
Je dovoleno použít písmena z jakéhokoli jazyka, včetně písmen z kyrilice nebo dokonce čínských znaků, třeba takto:
208+
=======
209+
````smart header="Non-Latin letters are allowed, but not recommended"
210+
It is possible to use any language, including cyrillic letters, Chinese logograms and so on, like this:
211+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
202212
203213
```js
204214
let имя = '...';

1-js/02-first-steps/05-types/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ Typ `symbol` se používá k vytváření unikátních identifikátorů pro obje
224224
225225
## Operátor typeof [#type-typeof]
226226
227+
<<<<<<< HEAD
227228
Operátor `typeof` vrací typ argumentu. Je užitečný, když chceme hodnoty různých typů zpracovávat různě anebo si jen chceme typ rychle ověřit.
229+
=======
230+
The `typeof` operator returns the type of the operand. It's useful when we want to process values of different types differently or just want to do a quick check.
231+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
228232
229233
Volání `typeof x` vrátí řetězec s názvem typu:
230234

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ Výsledkem `a % b` je [zbytek](https://cs.wikipedia.org/wiki/Zbytek_po_dělení)
5050
Příklad:
5151

5252
```js run
53+
<<<<<<< HEAD
5354
alert( 5 % 2 ); // 1, zbytek po dělení 5 děleno 2
5455
alert( 8 % 3 ); // 2, zbytek po dělení 8 děleno 3
56+
=======
57+
alert( 5 % 2 ); // 1, a remainder of 5 divided by 2
58+
alert( 8 % 3 ); // 2, a remainder of 8 divided by 3
59+
alert( 8 % 4 ); // 2, 0 remainder of 8 divided by 4
60+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
5561
```
5662

5763
### Umocňování **
@@ -68,7 +74,11 @@ alert( 2 ** 3 ); // 2³ = 8
6874
alert( 2 ** 4 ); // 2⁴ = 16
6975
```
7076

77+
<<<<<<< HEAD
7178
Stejně jako v matematice je operátor umocňování definován i pro necelá čísla.
79+
=======
80+
Just like in maths, the exponentiation operator is defined for non-integer numbers as well.
81+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
7282

7383
Například odmocnina je umocnění na ½:
7484

@@ -80,7 +90,11 @@ alert( 8 ** (1/3) ); // 2 (umocnění na 1/3 je totéž jako třetí odmocnina)
8090

8191
## Spojení řetězců pomocí binárního +
8292

93+
<<<<<<< HEAD
8394
Přejděme nyní k vlastnostem JavaScriptu, které jsou za hranicemi školní aritmetiky.
95+
=======
96+
Let's meet the features of JavaScript operators that are beyond school arithmetics.
97+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
8498
8599
Operátor plus `+` obvykle sčítá čísla.
86100
@@ -306,7 +320,7 @@ let n = 2;
306320
307321
n *= 3 + 5; // napřed se provede část vpravo, totéž jako n *= 8
308322
309-
alert( n ); // 16
323+
alert( n ); // 16
310324
```
311325
312326
## Inkrementace a dekrementace

1-js/02-first-steps/12-nullish-coalescing-operator/article.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,23 @@ Například zde zobrazíme `anonym`, jestliže proměnná `uživatel` není defi
2929
```js run
3030
let uživatel;
3131

32+
<<<<<<< HEAD
3233
alert(uživatel ?? "anonym"); // anonym (uživatel není definován)
34+
=======
35+
alert(user ?? "Anonymous"); // Anonymous (user is undefined)
36+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
3337
```
3438
3539
Zde je příklad, kde má proměnná `uživatel` přiřazenou hodnotu:
3640
3741
```js run
3842
let uživatel = "Jan";
3943

44+
<<<<<<< HEAD
4045
alert(uživatel ?? "anonym"); // Jan (uživatel je definován)
46+
=======
47+
alert(user ?? "Anonymous"); // John (user is not null/undefined)
48+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
4149
```
4250
4351
Můžeme také použít sekvenci `??` k výběru první hodnoty ze seznamu, která není `null/undefined`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,11 @@ Tyto příklady předpokládají běžný význam prefixů. Se svým týmem se m
459459
```smart header="Ultrakrátké názvy funkcí"
460460
Funkce, které se používají *velmi často*, mají někdy ultrakrátké názvy.
461461

462+
<<<<<<< HEAD
462463
Například knihovna [jQuery](http://jquery.com) definuje funkci s názvem `$`. Knihovna [Lodash](http://lodash.com/) má svou ústřední funkci pojmenovanou `_`.
464+
=======
465+
For example, the [jQuery](https://jquery.com/) framework defines a function with `$`. The [Lodash](https://lodash.com/) library has its core function named `_`.
466+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
463467

464468
To jsou však výjimky. Obecně by názvy funkcí měly být stručné a popisné.
465469
```

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The flow of development usually looks like this:
6969

7070
1. An initial spec is written, with tests for the most basic functionality.
7171
2. An initial implementation is created.
72-
3. To check whether it works, we run the testing framework [Mocha](http://mochajs.org/) (more details soon) that runs the spec. While the functionality is not complete, errors are displayed. We make corrections until everything works.
72+
3. To check whether it works, we run the testing framework [Mocha](https://mochajs.org/) (more details soon) that runs the spec. While the functionality is not complete, errors are displayed. We make corrections until everything works.
7373
4. Now we have a working initial implementation with tests.
7474
5. We add more use cases to the spec, probably not yet supported by the implementations. Tests start to fail.
7575
6. Go to 3, update the implementation till tests give no errors.
@@ -85,9 +85,9 @@ The first step is already complete: we have an initial spec for `pow`. Now, befo
8585

8686
Here in the tutorial we'll be using the following JavaScript libraries for tests:
8787

88-
- [Mocha](http://mochajs.org/) -- the core framework: it provides common testing functions including `describe` and `it` and the main function that runs tests.
89-
- [Chai](http://chaijs.com) -- the library with many assertions. It allows to use a lot of different assertions, for now we need only `assert.equal`.
90-
- [Sinon](http://sinonjs.org/) -- a library to spy over functions, emulate built-in functions and more, we'll need it much later.
88+
- [Mocha](https://mochajs.org/) -- the core framework: it provides common testing functions including `describe` and `it` and the main function that runs tests.
89+
- [Chai](https://www.chaijs.com/) -- the library with many assertions. It allows to use a lot of different assertions, for now we need only `assert.equal`.
90+
- [Sinon](https://sinonjs.org/) -- a library to spy over functions, emulate built-in functions and more, we'll need it much later.
9191

9292
These libraries are suitable for both in-browser and server-side testing. Here we'll consider the browser variant.
9393

@@ -338,14 +338,14 @@ The newly added tests fail, because our implementation does not support them. Th
338338
```smart header="Other assertions"
339339
Please note the assertion `assert.isNaN`: it checks for `NaN`.
340340
341-
There are other assertions in [Chai](http://chaijs.com) as well, for instance:
341+
There are other assertions in [Chai](https://www.chaijs.com/) as well, for instance:
342342
343343
- `assert.equal(value1, value2)` -- checks the equality `value1 == value2`.
344344
- `assert.strictEqual(value1, value2)` -- checks the strict equality `value1 === value2`.
345345
- `assert.notEqual`, `assert.notStrictEqual` -- inverse checks to the ones above.
346346
- `assert.isTrue(value)` -- checks that `value === true`
347347
- `assert.isFalse(value)` -- checks that `value === false`
348-
- ...the full list is in the [docs](http://chaijs.com/api/assert/)
348+
- ...the full list is in the [docs](https://www.chaijs.com/api/assert/)
349349
```
350350
351351
So we should add a couple of lines to `pow`:

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
# Polyfilly a transpilátory
33

4+
<<<<<<< HEAD
45
Jazyk JavaScript se neustále vyvíjí. Pravidelně se pro tento jazyk objevují nové návrhy, ty jsou analyzovány a jsou-li shledány užitečnými, přidají se na seznam na <https://tc39.github.io/ecma262/> a pak pokračují do [specifikace](http://www.ecma-international.org/publications/standards/Ecma-262.htm).
6+
=======
7+
The JavaScript language steadily evolves. New proposals to the language appear regularly, they are analyzed and, if considered worthy, are appended to the list at <https://tc39.github.io/ecma262/> and then progress to the [specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/).
8+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
59
610
Týmy vyvíjející JavaScriptové motory mají své vlastní nápady ohledně toho, co implementovat jako první. Mohou se rozhodnout implementovat návrhy, které jsou teprve načrtnuty, a odložit věci, které jsou už ve specifikaci, protože jsou méně zajímavé nebo prostě jen těžší na implementaci.
711

@@ -71,9 +75,15 @@ if (!Math.trunc) { // není-li taková funkce
7175
7276
JavaScript je vysoce dynamický jazyk. Skripty mohou přidávat nebo modifikovat libovolné funkce, dokonce i vestavěné.
7377
78+
<<<<<<< HEAD
7479
Dvě zajímavé knihovny polyfillů jsou:
7580
- [core js](https://github.com/zloirock/core-js), která toho podporuje mnoho a umožňuje přidávat jen potřebné vlastnosti.
7681
- [polyfill.io](http://polyfill.io) je služba, která poskytuje skript s polyfilly podle vlastností a uživatelova prohlížeče.
82+
=======
83+
Two interesting polyfill libraries are:
84+
- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features.
85+
- [polyfill.io](https://polyfill.io/) service that provides a script with polyfills, depending on the features and user's browser.
86+
>>>>>>> 8d9ecb724c7df59774d1e5ffb5e5167740b7d321
7787
7888
## Shrnutí
7989

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ Modern engines implement advanced algorithms of garbage collection.
205205

206206
A general book "The Garbage Collection Handbook: The Art of Automatic Memory Management" (R. Jones et al) covers some of them.
207207

208-
If you are familiar with low-level programming, more detailed information about V8's garbage collector is in the article [A tour of V8: Garbage Collection](http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection).
208+
If you are familiar with low-level programming, more detailed information about V8's garbage collector is in the article [A tour of V8: Garbage Collection](https://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection).
209209

210-
The [V8 blog](https://v8.dev/) also publishes articles about changes in memory management from time to time. Naturally, to learn more about garbage collection, you'd better prepare by learning about V8 internals in general and read the blog of [Vyacheslav Egorov](http://mrale.ph) who worked as one of the V8 engineers. I'm saying: "V8", because it is best covered by articles on the internet. For other engines, many approaches are similar, but garbage collection differs in many aspects.
210+
The [V8 blog](https://v8.dev/) also publishes articles about changes in memory management from time to time. Naturally, to learn more about garbage collection, you'd better prepare by learning about V8 internals in general and read the blog of [Vyacheslav Egorov](https://mrale.ph) who worked as one of the V8 engineers. I'm saying: "V8", because it is best covered by articles on the internet. For other engines, many approaches are similar, but garbage collection differs in many aspects.
211211

212212
In-depth knowledge of engines is good when you need low-level optimizations. It would be wise to plan that as the next step after you're familiar with the language.

1-js/04-object-basics/09-object-toprimitive/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ As we know already, many operators and functions perform type conversions, e.g.
226226

227227
If we pass an object as an argument, then there are two stages of calculations:
228228
1. The object is converted to a primitive (using the rules described above).
229-
2. If the necessary for further calculations, the resulting primitive is also converted.
229+
2. If necessary for further calculations, the resulting primitive is also converted.
230230

231231
For instance:
232232

1-js/05-data-types/03-string/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ This method actually has two additional arguments specified in [the documentatio
505505
506506
- There are 3 types of quotes. Backticks allow a string to span multiple lines and embed expressions `${…}`.
507507
- We can use special characters, such as a line break `\n`.
508-
- To get a character, use: `[]`.
508+
- To get a character, use: `[]` or `at` method.
509509
- To get a substring, use: `slice` or `substring`.
510510
- To lowercase/uppercase a string, use: `toLowerCase/toUpperCase`.
511511
- To look for a substring, use: `indexOf`, or `includes/startsWith/endsWith` for simple checks.
@@ -519,4 +519,4 @@ There are several other helpful methods in strings:
519519
520520
Strings also have methods for doing search/replace with regular expressions. But that's big topic, so it's explained in a separate tutorial section <info:regular-expressions>.
521521
522-
Also, as of now it's important to know that strings are based on Unicode encoding, and hence there're issues with comparisons. There's more about Unicode in the chapter <info:unicode>.
522+
Also, as of now it's important to know that strings are based on Unicode encoding, and hence there're issues with comparisons. There's more about Unicode in the chapter <info:unicode>.

0 commit comments

Comments
 (0)