Skip to content

Commit 7838fb0

Browse files
committed
merging all conflicts
2 parents 7479ca9 + 5dff42b commit 7838fb0

File tree

56 files changed

+529
-380
lines changed

Some content is hidden

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

56 files changed

+529
-380
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
@@ -36,6 +36,7 @@
3636

3737
Οι παρακάτω επιλογές αξίζουν την προσοχή σας:
3838

39+
<<<<<<< HEAD
3940
<<<<<<< HEAD
4041
- [Atom](https://atom.io/) (cross-platform, δωρεάν).
4142
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, δωρεάν).
@@ -46,11 +47,27 @@ The following options deserve your attention:
4647
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
4748
- [Notepad++](https://notepad-plus-plus.org/) (Windows, δωρεάν).
4849
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) είναι επίσης πολύ καλή επιλογή, εφόσον ξέρετε πώς να τα χρησιμοποιήσετε.
50+
=======
51+
There are many options, for instance:
52+
53+
- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware).
54+
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
55+
- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
56+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
4957
5058
## Ας μην διαφωνούμε
5159

5260
Οι επεξεργαστές κώδικα στις παραπάνω λίστες είναι εκείνοι που είτε εγώ είτε οι φίλοι μου τους οποίους θεωρώ καλούς προγραμματιστές έχουν χρησιμοποιήσει για μεγάλο χρονικό διάστημα και είναι ευχαριστημένοι.
5361

5462
Υπάρχουν και άλλοι σπουδαίοι επεξεργαστές κώδικα στον κόσμο μας. Παρακαλώ επιλέξτε αυτό που σας αρέσει περισσότερο.
5563

64+
<<<<<<< HEAD
5665
Η επιλογή ενός επεξεργαστή κώδικα, όπως και κάθε άλλο εργαλείο, είναι ατομική και εξαρτάται από τα έργα, τις συνήθειες και τις προσωπικές σας προτιμήσεις.
66+
=======
67+
The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences.
68+
69+
The author's personal opinion:
70+
71+
- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend.
72+
- 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).
73+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8

1-js/02-first-steps/04-variables/3-uppercast-constant/task.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,24 @@ const birthday = '18.04.1982';
1212
const age = someCode(birthday);
1313
```
1414

15+
<<<<<<< HEAD
1516
Εδώ έχουμε μια σταθερή ημερομηνία "birthday" και η "age" υπολογίζεται από "birthday" με τη βοήθεια κάποιου κωδικού (δεν παρέχεται για βραχύτητα και επειδή οι λεπτομέρειες δεν έχουν σημασία εδώ).
17+
=======
18+
Here we have a constant `birthday` for the date, and also the `age` constant.
19+
20+
The `age` is calculated from `birthday` using `someCode()`, which means a function call that we didn't explain yet (we will soon!), but the details don't matter here, the point is that `age` is calculated somehow based on the `birthday`.
21+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
1622
1723
Θα ήταν σωστό να χρησιμοποιήσετε κεφαλαία γράμματα για τα `birthday`; Για `age`; Ή ακόμα και για τα δύο;
1824

1925
```js
26+
<<<<<<< HEAD
2027
const BIRTHDAY = '18.04.1982'; // Με κεφαλαία?
2128

2229
const AGE = someCode(BIRTHDAY); // Με κεφαλαία?
23-
```
30+
=======
31+
const BIRTHDAY = '18.04.1982'; // make birthday uppercase?
2432

33+
const AGE = someCode(BIRTHDAY); // make age uppercase?
34+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
35+
```

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ let message = "That"; // SyntaxError: 'message' has already been declared
161161
````
162162

163163
```smart header="Functional languages"
164+
<<<<<<< HEAD
164165
Είναι ενδιαφέρον να σημειωθεί ότι υπάρχουν [functional](https://en.wikipedia.org/wiki/Functional_programming) γλώσσες προγραμματισμού, όπως [Scala](http://www.scala-lang.org/) ή [Erlang](http://www.erlang.org/) που απαγορεύουν την αλλαγή τιμής στις μεταβλητές.
166+
=======
167+
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.
168+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
165169
166170
Σε τέτοιες γλώσσες, όταν η τιμή αποθηκευτεί "στο κουτί", είναι εκεί για πάντα. Εάν χρειαστεί να αποθηκεύσουμε κάτι άλλο, η γλώσσα μας αναγκάζει να δημιουργήσουμε ένα νέο πλαίσιο (δηλώστε μια νέα μεταβλητή). Δεν μπορούμε να επαναχρησιμοποιήσουμε το παλιό.
167171
@@ -212,7 +216,11 @@ Variables named `apple` and `APPLE` are two different variables.
212216
```
213217

214218
````smart header="Non-Latin letters are allowed, but not recommended"
219+
<<<<<<< HEAD
215220
Είναι δυνατή η χρήση οποιασδήποτε γλώσσας, συμπεριλαμβανομένων κυριλλικών γραμμάτων ή ακόμη και ιερογλυφικών, όπως αυτή:
221+
=======
222+
It is possible to use any language, including cyrillic letters, Chinese logograms and so on, like this:
223+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
216224
217225
```js
218226
let имя = '...';

1-js/02-first-steps/08-operators/3-primitive-conversions-questions/solution.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ undefined + 1 = NaN // (6)
1616
" \t \n" - 2 = -2 // (7)
1717
```
1818

19+
<<<<<<< HEAD
1920
1. Η πρόσθεση με μια συμβολοσειρά όπως π.χ. `"" + 1`, μετατρέπει το `1` σε μια συμβολοσειρά: `"" + 1 = "1"`, και τότε έχουμε `"1" + 0`, όπου ο ίδιος κανόνας εφαρμόζεται.
2021
2. Η αφαίρεση `-` (όπως στις περισσότερες Μαθηματικές πράξεις) λειτουργεί μόνο με αριθμούς, και μετατρέπει μια άδεια συμβολοσειρά `""` σε `0`.
2122
3. Η πρόσθεση με μια συμβολοσειρά, τοποθετεί τον αριθμό `5` στη συμβολοσειρά (επιπλέον παράδειγμα: `5 +"9" = "59"`).
2223
4. Η αφαίρεση μετατρέπει τις τιμές πάντα σε αριθμούς, επομένως εδώ μετατρέπει το `" -9 "` στον αριθμό `-9` (αγνοώντας τα κενά γύρω του).
2324
5. Η `null` γίνεται `0` μετά την αριθμητική μετατροπή.
2425
6. Η `undefined` γίνεται `NaN` μετά την αριθμητική μετατροπή.
2526

27+
=======
28+
1. The addition with a string `"" + 1` converts `1` to a string: `"" + 1 = "1"`, and then we have `"1" + 0`, the same rule is applied.
29+
2. The subtraction `-` (like most math operations) only works with numbers, it converts an empty string `""` to `0`.
30+
3. The addition with a string appends the number `5` to the string.
31+
4. The subtraction always converts to numbers, so it makes `" -9 "` a number `-9` (ignoring spaces around it).
32+
5. `null` becomes `0` after the numeric conversion.
33+
6. `undefined` becomes `NaN` after the numeric conversion.
34+
7. Space characters are trimmed off string start and end when a string is converted to a number. Here the whole string consists of space characters, such as `\t`, `\n` and a "regular" space between them. So, similarly to an empty string, it becomes `0`.
35+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ alert( 8 ** (1/3) ); // 2 (η ισχύς του 1/3 είναι η ίδια με
7777

7878
Ας συναντήσουμε τις δυνατότητες των τελεστών JavaScript που είναι πέρα από τη σχολική αριθμητική.
7979

80+
<<<<<<< HEAD
8081
Συνήθως, ο τελεστής συν `+` αθροίζει τους αριθμούς
82+
=======
83+
Let's meet the features of JavaScript operators that are beyond school arithmetics.
84+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
8185
8286
Όμως, εάν το δυαδικό `+` εφαρμόζεται σε συμβολοσειρές, τα συγχωνεύει:
8387

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ result = (a !== null && a !== undefined) ? a : b;```
2424
```js run
2525
let user;
2626

27-
alert(user ?? "Anonymous"); // Anonymous (user not defined)
27+
alert(user ?? "Anonymous"); // Anonymous (user is undefined)
2828
```
2929
3030
Φυσικά, εάν ο `user` είχε κάποια τιμή εκτός από το `null/undefined`, τότε θα το δούμε:
3131
3232
```js run
3333
let user = "John";
3434

35-
alert(user ?? "Anonymous"); // John (user defined)
35+
alert(user ?? "Anonymous"); // John (user is not null/udefined)
3636
```
3737
3838
Μπορούμε επίσης να χρησιμοποιήσουμε μια ακολουθία του `??` για να επιλέξουμε την πρώτη τιμή από μια λίστα που δεν είναι `null/undefined`.

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,42 @@ function showMessage(from, text = anotherFunction()) {
215215
216216
Μερικές φορές έχει νόημα να ορίσετε προεπιλεγμένες τιμές για παραμέτρους όχι στη δήλωση συνάρτησης, αλλά σε μεταγενέστερο στάδιο, κατά την εκτέλεση.
217217
218+
<<<<<<< HEAD
218219
Για να ελέγξουμε μια παράμετρο που παραλείφθηκε, μπορούμε να τη συγκρίνουμε με το `undefined`:
220+
=======
221+
For example, an explicit check for `undefined`:
222+
223+
```js
224+
function showMessage(from, text) {
225+
*!*
226+
if (text === undefined) {
227+
text = 'no text given';
228+
}
229+
*/!*
230+
231+
alert( from + ": " + text );
232+
}
233+
```
234+
235+
...Or using the `||` operator:
236+
237+
```js
238+
function showMessage(from, text) {
239+
// If the value of text is falsy, assign the default value
240+
// this assumes that text == "" is the same as no text at all
241+
text = text || 'no text given';
242+
...
243+
}
244+
```
245+
````
246+
247+
248+
### Alternative default parameters
249+
250+
Sometimes it makes sense to assign default values for parameters at a later stage after the function declaration.
251+
252+
We can check if the parameter is passed during the function execution, by comparing it with `undefined`:
253+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
219254
220255
```js run
221256
function showMessage(text) {
@@ -408,7 +443,11 @@ checkPermission(..) // ελέγχει μια συναίνεση, επιστρέ
408443
```smart header="'Ονομα συνάρτησης Ultrashort"
409444
Οι συναρτήσεις που χρησιμοποιούνται *πολύ συχνά* μερικές φορές έχουν συντομα ονόματα.
410445
446+
<<<<<<< HEAD
411447
Για παράδειγμα το [jQuery](http://jquery.com) βιβλιοθήκη ορίζει μια συνάρτηση με `$`. Το [Lodash](http://lodash.com/) βιβλιοθήκη δηλώνει τις συναρτήσεις με `_`.
448+
=======
449+
For example, the [jQuery](https://jquery.com/) framework defines a function with `$`. The [Lodash](https://lodash.com/) library has its core function named `_`.
450+
>>>>>>> 5dff42ba283bce883428c383c080fa9392b71df8
412451
413452
Αυτές είναι εξαιρέσεις. Γενικά τα ονόματα των συναρτήσεων πρέπει να είναι συνοπτικά και περιγραφικά.
414453

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Polyfills and transpilers
33

4-
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](http://www.ecma-international.org/publications/standards/Ecma-262.htm).
4+
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/).
55

66
Teams behind JavaScript engines have their own ideas about what to implement first. They may decide to implement proposals that are in draft and postpone things that are already in the spec, because they are less interesting or just harder to do.
77

@@ -73,7 +73,7 @@ JavaScript is a highly dynamic language. Scripts may add/modify any function, ev
7373
7474
Two interesting polyfill libraries are:
7575
- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features.
76-
- [polyfill.io](http://polyfill.io) service that provides a script with polyfills, depending on the features and user's browser.
76+
- [polyfill.io](https://polyfill.io/) service that provides a script with polyfills, depending on the features and user's browser.
7777
7878
7979
## Summary

0 commit comments

Comments
 (0)