diff --git a/1-js/01-getting-started/4-devtools/article.md b/1-js/01-getting-started/4-devtools/article.md index d4a44e24e..990fce4a3 100644 --- a/1-js/01-getting-started/4-devtools/article.md +++ b/1-js/01-getting-started/4-devtools/article.md @@ -24,7 +24,7 @@ Φαίνεται κάπως έτσι: -![chrome](chrome.png) +![chrome](chrome.webp) Η ακριβής εμφάνιση των develοper tools εξαρτάται από την έκδοση του Chrome. Αλλάζει από καιρό σε καιρό, αλλά πρέπει να είναι παρόμοια. @@ -51,7 +51,11 @@ To insert multiple lines, press `key:Shift+Enter`. This way one can enter long f Το Safari (πρόγραμμα περιήγησης του Mac, που δεν υποστηρίζεται από τα Windows / Linux) είναι λίγο ιδιαίτερο εδώ. Πρέπει πρώτα να ενεργοποιήσουμε το μενού "Develop menu". +<<<<<<< HEAD Ανοίξτε τις Προτιμήσεις και μεταβείτε στο παράθυρο "Για προχωρημένους". Υπάρχει ένα πλαίσιο ελέγχου στο κάτω μέρος: +======= +Open Settings and go to the "Advanced" pane. There's a checkbox at the bottom: +>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3 ![safari](safari.png) diff --git a/1-js/01-getting-started/4-devtools/chrome.png b/1-js/01-getting-started/4-devtools/chrome.png deleted file mode 100644 index 4cb3ea2f4..000000000 Binary files a/1-js/01-getting-started/4-devtools/chrome.png and /dev/null differ diff --git a/1-js/01-getting-started/4-devtools/chrome.webp b/1-js/01-getting-started/4-devtools/chrome.webp new file mode 100644 index 000000000..bdf067079 Binary files /dev/null and b/1-js/01-getting-started/4-devtools/chrome.webp differ diff --git a/1-js/01-getting-started/4-devtools/chrome@2.webp b/1-js/01-getting-started/4-devtools/chrome@2.webp new file mode 100644 index 000000000..2aeca5898 Binary files /dev/null and b/1-js/01-getting-started/4-devtools/chrome@2.webp differ diff --git a/1-js/01-getting-started/4-devtools/chrome@2x.png b/1-js/01-getting-started/4-devtools/chrome@2x.png deleted file mode 100644 index b87404a8f..000000000 Binary files a/1-js/01-getting-started/4-devtools/chrome@2x.png and /dev/null differ diff --git a/1-js/01-getting-started/4-devtools/safari.png b/1-js/01-getting-started/4-devtools/safari.png index 64c7a3f6c..4538827eb 100644 Binary files a/1-js/01-getting-started/4-devtools/safari.png and b/1-js/01-getting-started/4-devtools/safari.png differ diff --git a/1-js/01-getting-started/4-devtools/safari@2x.png b/1-js/01-getting-started/4-devtools/safari@2x.png index 27def4d09..1561b2bd9 100644 Binary files a/1-js/01-getting-started/4-devtools/safari@2x.png and b/1-js/01-getting-started/4-devtools/safari@2x.png differ diff --git a/1-js/02-first-steps/09-comparison/article.md b/1-js/02-first-steps/09-comparison/article.md index cefa5b256..738704138 100644 --- a/1-js/02-first-steps/09-comparison/article.md +++ b/1-js/02-first-steps/09-comparison/article.md @@ -208,6 +208,7 @@ alert( undefined == 0 ); // false (3) Απλώς αντιμετωπίστε οποιαδήποτε σύγκριση με το `undefined/null` εκτός από την αυστηρή ισότητα `===` με εξαιρετική προσοχή. +<<<<<<< HEAD Μην χρησιμοποιείτε συγκρίσεις `> => < <=` με μια μεταβλητή που μπορεί να είναι `null/undefined`, εκτός εάν είστε πραγματικά σίγουροι για το τι κάνετε. Εάν μια μεταβλητή μπορεί να έχει αυτές τις τιμές, ελέγξτε τις ξεχωριστά. ## Περίληψη @@ -217,3 +218,10 @@ alert( undefined == 0 ); // false (3) - Όταν συγκρίνονται τιμές διαφορετικών τύπων, μετατρέπονται σε αριθμούς (με εξαίρεση έναν αυστηρό έλεγχο ισότητας). - Οι τιμές `null` και `undefined` είναι ίσες `==` μεταξύ τους και δεν ισούται με καμία άλλη τιμή. - Να είστε προσεκτικοί όταν χρησιμοποιείτε συγκρίσεις όπως `>` ή `<` με μεταβλητές που μπορεί περιστασιακά να είναι `null/undefined`. Ο ξεχωριστός έλεγχος για το `null/undefined` είναι καλή ιδέα. +======= +- Comparison operators return a boolean value. +- Strings are compared letter-by-letter in the "dictionary" order. +- When values of different types are compared, they get converted to numbers (with the exclusion of a strict equality check). +- The values `null` and `undefined` are equal `==` to themselves and each other, but do not equal any other value. +- Be careful when using comparisons like `>` or `<` with variables that can occasionally be `null/undefined`. Checking for `null/undefined` separately is a good idea. +>>>>>>> d78b01e9833009fab534462e05c03cffc51bf0e3 diff --git a/1-js/05-data-types/04-array/article.md b/1-js/05-data-types/04-array/article.md index e71e86a5b..629a7c77f 100644 --- a/1-js/05-data-types/04-array/article.md +++ b/1-js/05-data-types/04-array/article.md @@ -100,7 +100,7 @@ Let's say we want the last element of the array. Some programming languages allow the use of negative indexes for the same purpose, like `fruits[-1]`. -Although, in JavaScript it won't work. The result will be `undefined`, because the index in square brackets is treated literally. +However, in JavaScript it won't work. The result will be `undefined`, because the index in square brackets is treated literally. We can explicitly calculate the last element index and then access it: `fruits[fruits.length - 1]`. diff --git a/1-js/06-advanced-functions/06-function-object/article.md b/1-js/06-advanced-functions/06-function-object/article.md index c84f4e52f..8419ae763 100644 --- a/1-js/06-advanced-functions/06-function-object/article.md +++ b/1-js/06-advanced-functions/06-function-object/article.md @@ -326,7 +326,7 @@ welcome(); // Hello, Guest (nested call works) Now it works, because the name `"func"` is function-local. It is not taken from outside (and not visible there). The specification guarantees that it will always reference the current function. -The outer code still has its variable `sayHi` or `welcome`. And `func` is an "internal function name", the way for the function to can call itself reliably. +The outer code still has its variable `sayHi` or `welcome`. And `func` is an "internal function name", the way for the function to call itself reliably. ```smart header="There's no such thing for Function Declaration" The "internal name" feature described here is only available for Function Expressions, not for Function Declarations. For Function Declarations, there is no syntax for adding an "internal" name. diff --git a/1-js/06-advanced-functions/10-bind/article.md b/1-js/06-advanced-functions/10-bind/article.md index 6d65e7dd1..7a6e47b90 100644 --- a/1-js/06-advanced-functions/10-bind/article.md +++ b/1-js/06-advanced-functions/10-bind/article.md @@ -125,7 +125,7 @@ funcUser(); // John */!* ``` -Here `func.bind(user)` as a "bound variant" of `func`, with fixed `this=user`. +Here `func.bind(user)` is a "bound variant" of `func`, with fixed `this=user`. All arguments are passed to the original `func` "as is", for instance: diff --git a/1-js/09-classes/06-instanceof/article.md b/1-js/09-classes/06-instanceof/article.md index f9db989ca..00aee3376 100644 --- a/1-js/09-classes/06-instanceof/article.md +++ b/1-js/09-classes/06-instanceof/article.md @@ -55,7 +55,7 @@ The algorithm of `obj instanceof Class` works roughly as follows: For example: ```js run - // setup instanceOf check that assumes that + // set up instanceof check that assumes that // anything with canEat property is an animal class Animal { static [Symbol.hasInstance](obj) { @@ -68,7 +68,7 @@ The algorithm of `obj instanceof Class` works roughly as follows: alert(obj instanceof Animal); // true: Animal[Symbol.hasInstance](obj) is called ``` -2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceOf Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain. +2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceof Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain. In other words, compare one after another: ```js diff --git a/1-js/10-error-handling/1-try-catch/article.md b/1-js/10-error-handling/1-try-catch/article.md index bf548373a..cad2e1a3e 100644 --- a/1-js/10-error-handling/1-try-catch/article.md +++ b/1-js/10-error-handling/1-try-catch/article.md @@ -632,7 +632,7 @@ For instance: The role of the global handler `window.onerror` is usually not to recover the script execution -- that's probably impossible in case of programming errors, but to send the error message to developers. -There are also web-services that provide error-logging for such cases, like or . +There are also web-services that provide error-logging for such cases, like or . They work like this: