Skip to content

Commit 1e2a27e

Browse files
authored
Merge pull request #103 from javascript-tutorial/sync-7000ede2
Sync with upstream @ 7000ede
2 parents f0d5de5 + 6efdbce commit 1e2a27e

9 files changed

Lines changed: 51 additions & 8 deletions

File tree

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11

22
# Εγχειρίδια και προδιαγραφές
33

4+
<<<<<<< HEAD
45
Αυτό το βιβλίο είναι ένα *εκπαιδευτικό υλικό*. Στόχος του είναι να σας βοηθήσει να μάθετε σταδιακά τη γλώσσα. Αλλά μόλις εξοικειωθείτε με τα βασικά, θα χρειαστείτε άλλες πηγές.
6+
=======
7+
This book is a *tutorial*. It aims to help you gradually learn the language. But once you're familiar with the basics, you'll need other resources.
8+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
59
610
## Προδιαγραφή
711

812
[Tο ECMA-262 προδιαγραφή](https://www.ecma-international.org/publications/standards/Ecma-262.htm) περιέχει την πιο αναλυτική, λεπτομερή και τυποποιημένη πληροφορία σχετικά με την JavaScript. Ορίζει την ίδια τη γλώσσα.
913

1014
Αλλά είναι τόσο επίσημο, είναι δύσκολο να το καταλάβεις στην αρχή. Έτσι, εάν χρειάζεστε την πιο αξιόπιστη πηγή πληροφοριών σχετικά με τις λεπτομέρειες της γλώσσας, η προδιαγραφή αυτή είναι το σωστό μέρος. Αλλά δεν είναι για καθημερινή χρήση.
1115

16+
<<<<<<< HEAD
1217
Μια νέα έκδοση προδιαγραφών κυκλοφορεί κάθε χρόνο. Μεταξύ αυτών των εκδόσεων, η τελευταία έκδοση υπάρχει και στο <https://tc39.es/ecma262/>.
18+
=======
19+
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
20+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
1321
1422
Για να διαβάσετε για τα πιο πρόσφατα νέα σχετικά για τα χαρακτηριστικά, συμπεριλαμβανομένων εκείνων που είναι "almost standard" (το λεγόμενο "stage 3") , βλέπε στο <https://github.com/tc39/proposals>.
1523

@@ -18,23 +26,37 @@
1826
## Εγχειρίδια
1927

2028

29+
<<<<<<< HEAD
2130
- **MDN (Mozilla) JavaScript Reference** είναι ένα εγχειρίδιο με παραδείγματα και άλλες πληροφορίες. Είναι καλό να λάβετε σε βάθος πληροφορίες σχετικά με μεμονωμένες λειτουργίες γλώσσας, μεθόδους κλπ.
2231

2332
Μπορεί κανείς να το βρει στο <https://developer.mozilla.org/en-US/ docs/Web/JavaScript/Reference>.
33+
=======
34+
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
35+
36+
Although, it's often best to use an internet search instead. Just use "MDN [term]" in the query, e.g. <https://google.com/search?q=MDN+parseInt> to search for the `parseInt` function.
37+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
2438
2539
Αν και είναι καλύτερα να χρησιμοποιήσετε μια αναζήτηση στο Διαδίκτυο. Απλά χρησιμοποιήστε "MDN [όρος]" σαν ερώτημα, πχ. <https://google.com/search?q=MDN+parseInt> αναζήτηση σχετικά για το `parseInt` function.
2640

2741

2842
- **MSDN** – Microsoft εγχειρίδιο με πολλές πληροφορίες, όπως JavaScript (συχνά αναφέρεται ως JScript). Εάν κάποιος χρειάζεται κάτι συγκεκριμένο για τον Internet Explorer, καλύτερα να πάτε στο: <http://msdn.microsoft.com/>.
2943

44+
<<<<<<< HEAD
3045
<<<<<<< HEAD
3146
Επίσης, μπορούμε να χρησιμοποιήσουμε μια αναζήτηση στο διαδίκτυο με φράσεις όπως "RegExp MSDN" ή "RegExp MSDN jscript".
3247
=======
3348
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <http://caniuse.com/#feat=cryptography>.
49+
=======
50+
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
51+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
3452
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
3553
>>>>>>> 30a5d5e2a7c3504c9afd5028f83f4a696e60aede
3654
55+
<<<<<<< HEAD
3756
## Πίνακες συμβατότητας
57+
=======
58+
All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
59+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
3860
3961
JavaScript είναι μια αναπτυσσόμενη γλώσσα, νέα χαρακτηριστικά προστίθενται τακτικά.
4062

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@
3636

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

39+
<<<<<<< HEAD
3940
- [Atom](https://atom.io/) (cross-platform, δωρεάν).
4041
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, δωρεάν).
42+
=======
43+
The following options deserve your attention:
44+
45+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
4146
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
4247
- [Notepad++](https://notepad-plus-plus.org/) (Windows, δωρεάν).
4348
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) είναι επίσης πολύ καλή επιλογή, εφόσον ξέρετε πώς να τα χρησιμοποιήσετε.

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,27 @@ n = 12.345;
7878

7979
## BigInt [#bigint-type]
8080

81+
<<<<<<< HEAD
8182
Στην JavaScript, ο τύπου "αριθμός" δεν μπορεί να αντιπροσωπεύει ακέραιες τιμές μεγαλύτερες από <code>2<sup>53</sup></code> (`9007199254740991`) (ή μικρότερες από <code>-2<sup>53</sup></code> για αρνητικά), αυτός είναι ένας τεχνικός περιορισμός που προκαλείται από την εσωτερική τους αναπαράσταση.
8283

8384

8485
Οπότε για τους περισσότερους σκοπούς ο περιορισμός δεν αποτελεί πρόβλημα, αλλά μερικές φορές χρειαζόμαστε πολύ μεγάλους αριθμούς, π.χ. για cryptography ή microsecond-precision timestamps.
86+
=======
87+
In JavaScript, the "number" type cannot safely represent integer values larger than <code>(2<sup>53</sup>-1)</code> (that's `9007199254740991`), or less than <code>-(2<sup>53</sup>-1)</code> for negatives.
88+
89+
To be really precise, the "number" type can store larger integers (up to <code>1.7976931348623157 * 10<sup>308</sup></code>), but outside of the safe integer range <code>±(2<sup>53</sup>-1)</code> there'll be a precision error, because not all digits fit into the fixed 64-bit storage. So an "approximate" value may be stored.
90+
91+
For example, these two numbers (right above the safe range) are the same:
92+
93+
```js
94+
console.log(9007199254740991 + 1); // 9007199254740992
95+
console.log(9007199254740991 + 2); // 9007199254740992
96+
```
97+
98+
So to say, all odd integers greater than <code>(2<sup>53</sup>-1)</code> can't be stored at all in the "number" type.
99+
100+
For most purposes <code>±(2<sup>53</sup>-1)</code> range is quite enough, but sometimes we need the entire range of really big integers, e.g. for cryptography or microsecond-precision timestamps.
101+
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
85102
86103
Ο τύπου `BigInt` προστέθηκε πρόσφατα στη γλώσσα για να αντιπροσωπεύει ακέραιους αριθμούς αυθαίρετου μήκους.
87104

1-js/02-first-steps/16-function-expressions/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ welcome(); // ok now
360360

361361

362362
```smart header="When to choose Function Declaration versus Function Expression?"
363-
As a rule of thumb, when we need to declare a function, the first to consider is Function Declaration syntax. It gives more freedom in how to organize our code, because we can call such functions before they are declared.
363+
As a rule of thumb, when we need to declare a function, the first thing to consider is Function Declaration syntax. It gives more freedom in how to organize our code, because we can call such functions before they are declared.
364364
365365
That's also better for readability, as it's easier to look up `function f(…) {…}` in the code than `let f = function(…) {…};`. Function Declarations are more "eye-catching".
366366

1-js/05-data-types/02-number/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
In modern JavaScript, there are two types of numbers:
44

5-
1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter.
5+
1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter.
66

7-
2. BigInt numbers represent integers of arbitrary length. They are sometimes needed because a regular number can't safely exceed <code>2<sup>53</sup></code> or be less than <code>-2<sup>53</sup></code>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
7+
2. BigInt numbers represent integers of arbitrary length. They are sometimes needed because a regular integer number can't safely exceed <code>(2<sup>53</sup>-1)</code> or be less than <code>-(2<sup>53</sup>-1)</code>, as we mentioned earlier in the chapter <info:types>. As bigints are used in few special areas, we devote them a special chapter <info:bigint>.
88

99
So here we'll talk about regular numbers. Let's expand our knowledge of them.
1010

@@ -192,7 +192,7 @@ There are two ways to do so:
192192

193193
## Imprecise calculations
194194

195-
Internally, a number is represented in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), so there are exactly 64 bits to store a number: 52 of them are used to store the digits, 11 of them store the position of the decimal point (they are zero for integer numbers), and 1 bit is for the sign.
195+
Internally, a number is represented in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754), so there are exactly 64 bits to store a number: 52 of them are used to store the digits, 11 of them store the position of the decimal point, and 1 bit is for the sign.
196196

197197
If a number is really huge, it may overflow the 64-bit storage and become a special numeric value `Infinity`:
198198

1-js/06-advanced-functions/05-global-object/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var gVar = 5;
2525
alert(window.gVar); // 5 (became a property of the global object)
2626
```
2727

28-
The same effect have function declarations (statements with `function` keyword in the main code flow, not function expressions).
28+
Function declarations have the same effect (statements with `function` keyword in the main code flow, not function expressions).
2929

3030
Please don't rely on that! This behavior exists for compatibility reasons. Modern scripts use [JavaScript modules](info:modules) where such a thing doesn't happen.
3131

1-js/08-prototypes/03-native-prototypes/proto-constructor-animal-rabbit.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

4-binary/01-arraybuffer-binary-arrays/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ for(let num of view) {
7171

7272
## TypedArray
7373

74-
The common term for all these views (`Uint8Array`, `Uint32Array`, etc) is [TypedArray](https://tc39.github.io/ecma262/#sec-typedarray-objects). They share the same set of methods and properities.
74+
The common term for all these views (`Uint8Array`, `Uint32Array`, etc) is [TypedArray](https://tc39.github.io/ecma262/#sec-typedarray-objects). They share the same set of methods and properties.
7575

7676
Please note, there's no constructor called `TypedArray`, it's just a common "umbrella" term to represent one of views over `ArrayBuffer`: `Int8Array`, `Uint8Array` and so on, the full list will soon follow.
7777

8-web-components/5-slots-composition/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ The shadow DOM template with proper slots:
269269
```
270270

271271
1. `<span slot="title">` goes into `<slot name="title">`.
272-
2. There are many `<li slot="item">` in the template, but only one `<slot name="item">` in the template. So all such `<li slot="item">` are appended to `<slot name="item">` one after another, thus forming the list.
272+
2. There are many `<li slot="item">` in the `<custom-menu>`, but only one `<slot name="item">` in the template. So all such `<li slot="item">` are appended to `<slot name="item">` one after another, thus forming the list.
273273

274274
The flattened DOM becomes:
275275

0 commit comments

Comments
 (0)