Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dde15c9
Improve English language/correct grammar
peterhauke Jun 22, 2022
a134d67
Fix one more missing word
peterhauke Jun 22, 2022
2bea6d7
Update article.md
printfinn Jul 1, 2022
d399df7
Remove language style improvements
peterhauke Jul 2, 2022
79b7f7c
update integers range in Data types chapter
chilipenko Jul 2, 2022
8b805b9
several fixes in Number chapter
chilipenko Jul 2, 2022
6726909
fixed incorrect apostrophe mark
chilipenko Jul 2, 2022
e2fc41e
fixed wikipedia link to IEEE-754 standard
chilipenko Jul 2, 2022
4b6654c
minor fixes
iliakan Jul 6, 2022
393efb7
fix: changed 'template' to '<custom-menu>'
Aleksey28 Jul 7, 2022
3b219ad
Merge pull request #3079 from peterhauke/patch-1
iliakan Jul 9, 2022
30b7e1d
Update article.md
leviding Jul 10, 2022
eedb3f3
Merge pull request #3088 from printfinn/patch-1
iliakan Jul 10, 2022
994eeb4
Merge pull request #3094 from leviding/patch-1
iliakan Jul 10, 2022
4124357
Merge pull request #3090 from Aleksey28/shadow
iliakan Jul 10, 2022
1375004
Merge pull request #3089 from chilipenko/fix-range-for-number-type
iliakan Jul 10, 2022
82ed8f1
minor fixes
iliakan Jul 10, 2022
9cd5bc5
Fix Typo
icarrington Jul 11, 2022
a04ee52
Removed Atom (Sunsetted) From List Of Code Editors
nayanadasgupta Jul 12, 2022
5dacac7
Merge pull request #3095 from icarrington/new_branch
iliakan Jul 13, 2022
55d806d
Merge pull request #3098 from nayanadasgupta/3097-remove-atom-from-li…
iliakan Jul 13, 2022
0004be1
Update article.md
xmready Jul 14, 2022
7000ede
Merge pull request #3104 from xmready/master
iliakan Jul 15, 2022
6efdbce
merging all conflicts
iliakan Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions 1-js/01-getting-started/2-manuals-specifications/article.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@

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

<<<<<<< HEAD
Αυτό το βιβλίο είναι ένα *εκπαιδευτικό υλικό*. Στόχος του είναι να σας βοηθήσει να μάθετε σταδιακά τη γλώσσα. Αλλά μόλις εξοικειωθείτε με τα βασικά, θα χρειαστείτε άλλες πηγές.
=======
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.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322

## Προδιαγραφή

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

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

<<<<<<< HEAD
Μια νέα έκδοση προδιαγραφών κυκλοφορεί κάθε χρόνο. Μεταξύ αυτών των εκδόσεων, η τελευταία έκδοση υπάρχει και στο <https://tc39.es/ecma262/>.
=======
A new specification version is released every year. Between these releases, the latest specification draft is at <https://tc39.es/ecma262/>.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322

Για να διαβάσετε για τα πιο πρόσφατα νέα σχετικά για τα χαρακτηριστικά, συμπεριλαμβανομένων εκείνων που είναι "almost standard" (το λεγόμενο "stage 3") , βλέπε στο <https://github.com/tc39/proposals>.

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


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

Μπορεί κανείς να το βρει στο <https://developer.mozilla.org/en-US/ docs/Web/JavaScript/Reference>.
=======
You can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.

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.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322

Αν και είναι καλύτερα να χρησιμοποιήσετε μια αναζήτηση στο Διαδίκτυο. Απλά χρησιμοποιήστε "MDN [όρος]" σαν ερώτημα, πχ. <https://google.com/search?q=MDN+parseInt> αναζήτηση σχετικά για το `parseInt` function.


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

<<<<<<< HEAD
<<<<<<< HEAD
Επίσης, μπορούμε να χρησιμοποιήσουμε μια αναζήτηση στο διαδίκτυο με φράσεις όπως "RegExp MSDN" ή "RegExp MSDN jscript".
=======
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <http://caniuse.com/#feat=cryptography>.
=======
- <https://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <https://caniuse.com/#feat=cryptography>.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
>>>>>>> 30a5d5e2a7c3504c9afd5028f83f4a696e60aede

<<<<<<< HEAD
## Πίνακες συμβατότητας
=======
All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322

JavaScript είναι μια αναπτυσσόμενη γλώσσα, νέα χαρακτηριστικά προστίθενται τακτικά.

Expand Down
5 changes: 5 additions & 0 deletions 1-js/01-getting-started/3-code-editors/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@

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

<<<<<<< HEAD
- [Atom](https://atom.io/) (cross-platform, δωρεάν).
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, δωρεάν).
=======
The following options deserve your attention:

>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
- [Notepad++](https://notepad-plus-plus.org/) (Windows, δωρεάν).
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) είναι επίσης πολύ καλή επιλογή, εφόσον ξέρετε πώς να τα χρησιμοποιήσετε.
Expand Down
17 changes: 17 additions & 0 deletions 1-js/02-first-steps/05-types/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,27 @@ n = 12.345;

## BigInt [#bigint-type]

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


Οπότε για τους περισσότερους σκοπούς ο περιορισμός δεν αποτελεί πρόβλημα, αλλά μερικές φορές χρειαζόμαστε πολύ μεγάλους αριθμούς, π.χ. για cryptography ή microsecond-precision timestamps.
=======
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.

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.

For example, these two numbers (right above the safe range) are the same:

```js
console.log(9007199254740991 + 1); // 9007199254740992
console.log(9007199254740991 + 2); // 9007199254740992
```

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.

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.
>>>>>>> 7000ede297bfd688f9a3767e8ca43abd9242f322

Ο τύπου `BigInt` προστέθηκε πρόσφατα στη γλώσσα για να αντιπροσωπεύει ακέραιους αριθμούς αυθαίρετου μήκους.

Expand Down
2 changes: 1 addition & 1 deletion 1-js/02-first-steps/16-function-expressions/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ welcome(); // ok now


```smart header="When to choose Function Declaration versus Function Expression?"
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.
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.

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".

Expand Down
6 changes: 3 additions & 3 deletions 1-js/05-data-types/02-number/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

In modern JavaScript, there are two types of numbers:

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.
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.

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>.
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>.

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

Expand Down Expand Up @@ -192,7 +192,7 @@ There are two ways to do so:

## Imprecise calculations

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.
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.

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

Expand Down
2 changes: 1 addition & 1 deletion 1-js/06-advanced-functions/05-global-object/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var gVar = 5;
alert(window.gVar); // 5 (became a property of the global object)
```

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

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.

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion 4-binary/01-arraybuffer-binary-arrays/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ for(let num of view) {

## TypedArray

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.
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.

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.

Expand Down
2 changes: 1 addition & 1 deletion 8-web-components/5-slots-composition/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ The shadow DOM template with proper slots:
```

1. `<span slot="title">` goes into `<slot name="title">`.
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.
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.

The flattened DOM becomes:

Expand Down