You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
В більшості редакторів, рядок коду можна закоментувати, натиснувши комбінацію клавіш `key:Ctrl+/`, а щоб закоментувати декілька рядків – виділіть потрібні рядки і натисніть комбінацію клавіш `key:Ctrl+Shift+/`. Для Mac, потрібно натискати клавішу `key:Cmd` замість `key:Ctrl`.
139
+
В більшості редакторів, рядок коду можна закоментувати, натиснувши комбінацію клавіш `key:Ctrl+/`, а щоб закоментувати декілька рядків – виділіть потрібні рядки і натисніть комбінацію клавіш `key:Ctrl+Shift+/`. Для Mac, потрібно натискати клавішу `key:Cmd` замість `key:Ctrl`, і клавішу `key:Option` замість `key:Shift`.
140
140
```
141
141
142
142
````warn header="Вкладені коментарі не підтримуються!"
Як ми бачемо, "унарний плюс" має пріоритет `16`, що вище за `13` — пріоритет "додавання" (бінарний плюс). Саме тому, у виразі `"+apples + +oranges"`, унарні плюси виконуються до додавання (бінарного плюса).
151
+
Як ми бачемо, "унарний плюс" має пріоритет `17`, що вище за `13` — пріоритет "додавання" (бінарний плюс). Саме тому, у виразі `"+apples + +oranges"`, унарні плюси виконуються перед додаванням (бінарним плюсом).
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/01-object/article.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -301,11 +301,11 @@ As for now, it's important to know that such behavior of `__proto__` can become
301
301
302
302
The problem is that a visitor may choose `__proto__` as the key, and the assignment logic will be ruined (as shown above).
303
303
304
-
Later we'll see workarounds for the problem:
305
-
1.We'll see how to make an objects treat `__proto__` as a regular property in the chapter [](info:prototype-methods).
306
-
2.There's also study another data structure [Map](info:map-set) in the chapter <info:map-set>, which supports arbitrary keys.
304
+
There are two workarounds for the problem:
305
+
1.Modify the object's behavior to treat `__proto__` as a regular property. We'll learn how to do it in the chapter [](info:prototype-methods).
306
+
2.Using [Map](info:map-set)data structure which supports arbitrary keys. We'll learn it in the chapter <info:map-set>.
307
307
308
-
## Property existance test, "in" operator
308
+
## Property existence test, "in" operator
309
309
310
310
A notable objects feature is that it's possible to access any property. There will be no error if the property doesn't exist! Accessing a non-existing property just returns `undefined`. It provides a very common way to test whether the property exists -- to get it and compare vs undefined:
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/04-object-methods/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ user.sayHi(); // Hello!
63
63
```smart header="Object-oriented programming"
64
64
When we write our code using objects to represent entities, that's called [object-oriented programming](https://en.wikipedia.org/wiki/Object-oriented_programming), in short: "OOP".
65
65
66
-
OOP is a big thing, an interesting science of its own. How to choose the right entities? How to organize the interaction between them? That's architecture, and there are great books on that topic, like "Design Patterns: Elements of Reusable Object-Oriented Software" by E.Gamma, R.Helm, R.Johnson, J.Vissides or "Object-Oriented Analysis and Design with Applications" by G.Booch, and more.
66
+
OOP is a big thing, an interesting science of its own. How to choose the right entities? How to organize the interaction between them? That's architecture, and there are great books on that topic, like "Design Patterns: Elements of Reusable Object-Oriented Software" by E.Gamma, R.Helm, R.Johnson, J.Vissides or "Object-Oriented Analysis and Design with Applications" by G.Booch, and more.
Copy file name to clipboardExpand all lines: 1-js/06-advanced-functions/03-closure/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,7 +345,7 @@ let arr = [f(), f(), f()];
345
345
346
346
A Lexical Environment object dies when it becomes unreachable (just like any other object). In other words, it exists only while there's at least one nested function referencing it.
347
347
348
-
In the code below, after the nested function is removed, its enclosing Lexical Environment (and hence the `value`) is cleaned from memory;
348
+
In the code below, after the nested function is removed, its enclosing Lexical Environment (and hence the `value`) is cleaned from memory:
0 commit comments