Skip to content

Commit 8054efd

Browse files
malechaneitPurusahNickFallmanhordiienko-tatianaMykolaSopiha
authored
Modifying the document (#299)
* Modifying document. Article and tasks * TextDecoder and TextEncoder (#256) * Update article.md ms - official international name for millisecond. 1 ms = 1 * 10**(-3) second (or 1e-3). Source : https://en.wikipedia.org/wiki/Metric_prefix . 0.000001 or 1e-6 - it's microsecond. Better name for this variable 'mcs' or 'us'. 'mcs' easier to understand. * Promises chaining (#259) * Basic DOM Node Properties (#260) * Event delegation (#262) * Reorder contributors arrording translated articles * Remove contributor * docs: add OlhaBrozhenets as a contributor for translation (#263) * Browser default actions (#264) * Attributes and properties (#265) * Translate chapter title * Chapter 'Data Types': translate title and description * Chapter 'Adnavced functions': translate title and description * Translate chapter title and description * Translate chapter 'Prototypes, inheritance' * Translate chapter 'Classes' * Translate chapter 'Error handling' * Translate chapter 'Modules' * Translate chapter 'Miscellaneous' * Update index.md * Translate headers * Update article.md * Dispatching custom events (#268) * Переклад заголовків другої частини підручника (#269) * devtools fix (#275) * fix itnro (#271) * fix manual specifications (#276) * docs: add Mouu9 as a contributor for bug (#277) * first steps little fix (#278) * Update TRANSLATION.md * Update README.md * Review 'Data Types' (#284) * Review 'Variables' (#283) * Review 'Structure' (#282) * Article 'Hello World': Fix button name (#280) * Window sizes and scrolling (#279) * docs: add jeneg as a contributor for translation (#285) * Blob (#270) * Scripts: async, defer (#273) * Mouse events (#274) * Fix: Scripts: async, defer (#289) * fix 06-alert-prompt-confirm (#286) * 07-type-conversions fix * Adds pointer events * Adds pointer events edits * Adds pointer events edits * Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md * Update 2-ui/1-document/07-modifying-document/4-clear-elem/task.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html * Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.md * Update 2-ui/1-document/07-modifying-document/9-calendar-table/source.view/index.html * Update images.yml * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md * Update 2-ui/1-document/07-modifying-document/12-sort-table/solution.md * Update 2-ui/1-document/07-modifying-document/12-sort-table/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/12-sort-table/source.view/index.html * Update 2-ui/1-document/07-modifying-document/12-sort-table/task.md * Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md * Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/solution.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/2-events/03-event-delegation/3-sortable-table/source.view/index.html * Update 2-ui/2-events/03-event-delegation/3-sortable-table/task.md * Update 2-ui/2-events/03-event-delegation/3-sortable-table/source.view/index.html * Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md * Update 2-ui/1-document/07-modifying-document/5-why-aaa/task.md * Update 1-js/02-first-steps/04-variables/article.md * Update 1-js/02-first-steps/04-variables/article.md * Update 1-js/01-getting-started/4-devtools/article.md * Update 1-js/02-first-steps/02-structure/article.md * Update 1-js/02-first-steps/04-variables/article.md * Update 1-js/02-first-steps/06-alert-prompt-confirm/article.md * Update 1-js/02-first-steps/07-type-conversions/article.md * Update 1-js/02-first-steps/07-type-conversions/article.md * Update 1-js/02-first-steps/07-type-conversions/article.md * Update 1-js/02-first-steps/07-type-conversions/article.md * Update 1-js/11-async/03-promise-chaining/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/4-where-document-in-hierarchy/solution.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/10-size-and-scroll-window/article.md * Update 1-js/11-async/03-promise-chaining/article.md * Update 1-js/11-async/03-promise-chaining/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/05-dispatch-events/article.md * Update 2-ui/2-events/05-dispatch-events/article.md * Update 2-ui/3-event-details/1-mouse-events-basics/article.md * Update 2-ui/3-event-details/1-mouse-events-basics/article.md * Update 2-ui/2-events/05-dispatch-events/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/1-document/10-size-and-scroll-window/article.md * Update 2-ui/1-document/10-size-and-scroll-window/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/03-event-delegation/article.md * Update 2-ui/2-events/05-dispatch-events/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/4-where-document-in-hierarchy/solution.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/1-document/06-dom-attributes-and-properties/article.md * Update 2-ui/1-document/06-dom-attributes-and-properties/article.md * Update 2-ui/1-document/06-dom-attributes-and-properties/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md * Update 4-binary/03-blob/article.md * Update 4-binary/03-blob/article.md * Update 2-ui/5-loading/02-script-async-defer/article.md * Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html * Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html * Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html * Update 4-binary/03-blob/article.md * Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html * Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html * Update 2-ui/2-events/03-event-delegation/3-sortable-table/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html * Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html * Update 1-js/11-async/03-promise-chaining/article.md * Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md * Update 2-ui/1-document/05-basic-dom-node-properties/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 1-js/02-first-steps/02-structure/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/2-events/04-default-browser-action/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md * Update 2-ui/1-document/07-modifying-document/article.md Co-authored-by: Vladyslav Bohaichuk <[email protected]> Co-authored-by: NickFallman <[email protected]> Co-authored-by: hordiienko-tatiana <[email protected]> Co-authored-by: Mykola Sopiha <[email protected]> Co-authored-by: Olha Brozhenets <[email protected]> Co-authored-by: tarasyyyk <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Stanislav <[email protected]> Co-authored-by: Mouu9 <[email protected]> Co-authored-by: Yevhenii Chubar <[email protected]> Co-authored-by: Vitaly Nesteruk <[email protected]>
1 parent 4ceea7f commit 8054efd

File tree

56 files changed

+462
-457
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

+462
-457
lines changed

1-js/01-getting-started/4-devtools/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Safari (стандартний браузер у macOS, не підтримує
5353

5454
![safari](safari.png)
5555

56-
Тепер комбінація клавіш `key:Cmd+Opt+C` може переключати консоль. Також зауважте, що з'явився новий пункт "Розробка" у верхньому меню. Це меню має багато команд та опцій.
56+
Тепер комбінація клавіш `key:Cmd+Opt+C` може переключати консоль. Також зауважте, що зявився новий пункт "Розробка" у верхньому меню. Це меню має багато команд та опцій.
5757

5858
## Підсумки
5959

1-js/02-first-steps/02-structure/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ alert("Привіт")
8383
alert("Привіт")[1, 2].forEach(alert);
8484
```
8585
86-
Дивний вигляд, чи не так? У цьому випадку таке об’єднання неправильне. Щоби код правильно працював, нам потрібно поставити крапку з комою після `alert`.
86+
Виглядає дивно, чи не так? У цьому випадку таке об’єднання неправильне. Щоби код правильно працював, нам потрібно поставити крапку з комою після `alert`.
8787
8888
Це може статися в інших випадках.
8989
````
@@ -138,7 +138,7 @@ alert('Світ');
138138
````warn header="Вкладені коментарі не підтримуються!"
139139
Не може бути `/*...*/` всередині `/*...*/`.
140140
141-
Такий код "умре" з помилкою:
141+
Такий код "помре" з помилкою:
142142
143143
```js run no-beautify
144144
/*

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ let message = "Той"; // SyntaxError: 'message' has already been declared
160160

161161
В JavaScript є два обмеження, які стосуються імен змінних:
162162

163-
1. Ім'я має містити лише букви, цифри або символи `$` і `_`.
163+
1. Імя має містити лише букви, цифри або символи `$` і `_`.
164164
2. Перший символ не має бути числом.
165165

166166
Ось приклади допустимих імен:
@@ -263,7 +263,7 @@ myBirthday = '01.01.2001'; // помилка, не можна перевизна
263263
264264
### Константи в верхньому регістрі
265265
266-
Широко поширена практика використання констант як псевдонімів для значень, які важко запам'ятати і які відомі до початку виконання скрипта.
266+
Широко поширена практика використання констант як псевдонімів для значень, які важко запамятати і які відомі до початку виконання скрипта.
267267
268268
Такі константи пишуться в верхньому регістрі з використанням підкреслень.
269269
@@ -282,7 +282,7 @@ alert(color); // #FF7F00
282282
283283
Переваги:
284284
285-
- `COLOR_ORANGE` набагато легше запам'ятати, ніж `"#FF7F00"`.
285+
- `COLOR_ORANGE` набагато легше запамятати, ніж `"#FF7F00"`.
286286
- Набагато легше допустити помилку в `"#FF7F00"`, ніж під час введення `COLOR_ORANGE`.
287287
- Під час читання коду `COLOR_ORANGE` набагато зрозуміліше, ніж `#FF7F00`.
288288

1-js/02-first-steps/06-alert-prompt-confirm/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ alert( isBoss ); // true, якщо натиснута OK
9797
9898
Усі ці методи є модальними: вони призупиняють виконання скриптів та не дають відвідувачам змогу взаємодіяти з рештою сторінки, поки вікно не буде закрите.
9999
100-
Є два обмеження, пов'язані з усіма методами вище:
100+
Є два обмеження, повязані з усіма методами вище:
101101
102102
1. Точне розташування модального вікна визначається браузером. Зазвичай це в центрі.
103103
2. Точний вигляд вікна також залежить від браузера. Ми не можемо його змінити.

1-js/02-first-steps/07-type-conversions/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
Є також випадки, коли нам необхідно явно перетворити значення на очікуваний тип.
88

9-
```smart header="Поки що не говоримо про об'єкти"
10-
У цьому розділі ми не будемо охоплювати об'єкти. Поки що ми поговоримо тільки про примітиви.
9+
```smart header="Поки що не говоримо про обєкти"
10+
У цьому розділі ми не будемо охоплювати обєкти. Поки що ми поговоримо тільки про примітиви.
1111
12-
Пізніше, після ознайомлення з об'єктами, ми розглянемо їхнє перетворення в розділі <info:object-toprimitive>.
12+
Пізніше, після ознайомлення з обєктами, ми розглянемо їхнє перетворення в розділі <info:object-toprimitive>.
1313
```
1414

1515
## Перетворення на рядок
@@ -142,7 +142,7 @@ alert( Boolean(" ") ); // пробіли, також true (будь-які не
142142
|будь-які інші значення| `true` |
143143
144144
145-
Більшість із цих правил легко зрозуміти й запам'ятати. Примітними винятками, де люди зазвичай роблять помилки, є:
145+
Більшість із цих правил легко зрозуміти й запамятати. Примітними винятками, де люди зазвичай роблять помилки, є:
146146
147147
- `undefined` є `NaN` як число, а не `0`.
148148
- `"0"` і рядки, що мають тільки пробіли, такі як `" "`, є `true` як булеві значення.

1-js/11-async/03-promise-chaining/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Ланцюжок промісів
33

4-
Повернемося до проблеми, згаданої в розділі [Введення: колбеки](info:callbacks): у нас є послідовність асинхронних задач, які потрібно виконувати одну за одною — наприклад, завантаження скриптів. Як ми можемо це добре закодувати?
4+
Повернемося до проблеми, згаданої в розділі <info:callbacks>: у нас є послідовність асинхронних задач, які потрібно виконувати одну за одною — наприклад, завантаження скриптів. Як ми можемо це добре закодувати?
55

66
Проміси надають кілька способів вирішення подібних задач.
77

@@ -36,7 +36,7 @@ new Promise(function(resolve, reject) {
3636

3737
Ось потік виконання:
3838
1. Початковий проміс успішно виконується через 1 секунду `(*)`,
39-
2. Далі викликається обробник `.then` `(**)`, який у свою чергу, створює новий проміс (вирішується зі значенням `2`).
39+
2. Далі на `(**)` викликається обробник `.then`, який у свою чергу, створює новий проміс (вирішується зі значенням `2`).
4040
3. Наступний `then` `(***)` приймає результат попереднього, оброблює його (подвоює) та передає до наступного обробника.
4141
4. ...і так далі.
4242

@@ -78,7 +78,7 @@ promise.then(function(result) {
7878

7979
![](promise-then-many.svg)
8080

81-
Усі `.then` на одному й тому самому промісі отримують той самий результат - результат цього промісу. Тож у коді вище усі `alert` показують те саме: `1`.
81+
Усі `.then` на одному й тому самому промісі отримують той самий результат -- результат цього промісу. Тож у коді вище усі `alert` показують те саме: `1`.
8282

8383
На практиці нам рідко потрібні кілька обробників для одного промісу. Набагато частіше використовується ланцюжок.
8484

@@ -120,7 +120,7 @@ new Promise(function(resolve, reject) {
120120
});
121121
```
122122

123-
Тут перший `.then` показує `1` і повертає `new Promise(…)` у рядку `(*)`. Через одну секунду він вирішується, а результат (аргумент `resolve`, тут це `результат * 2`) передається обробнику другого `.then`. Цей обробник знаходиться в рядку `(**)`, він показує `2` і робить те ж саме.
123+
Тут перший `.then` показує `1` і повертає `new Promise(…)` у рядку `(*)`. Через одну секунду він вирішується, а результат (аргумент `resolve`, тут це `result * 2`) передається обробнику другого `.then`. Цей обробник знаходиться в рядку `(**)`, він показує `2` і робить те ж саме.
124124

125125
Отже, результат такий же, як і в попередньому прикладі: 1 -> 2 -> 4, але тепер із затримкою в 1 секунду між викликами `alert`.
126126

2-ui/1-document/05-basic-dom-node-properties/2-tree-info/solution.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<li>Акваріум
2828
<ul>
2929
<li>Гупі</li>
30-
<li>Ангельська рибка</li>
30+
<li>Риби-ангели</li>
3131
</ul>
3232
</li>
3333
<li>Море

2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<ul>
88
<li>Ссавці
99
<ul>
10-
<li>Корів</li>
10+
<li>Корови</li>
1111
<li>Осли</li>
1212
<li>Собаки</li>
13-
<li>Тигер</li>
13+
<li>Тигри</li>
1414
</ul>
1515
</li>
1616
<li>Інші
@@ -27,7 +27,7 @@
2727
<li>Акваріум
2828
<ul>
2929
<li>Гуппі</li>
30-
<li>Ангельський</li>
30+
<li>Риби-ангели</li>
3131
</ul>
3232
</li>
3333
<li>Море

2-ui/1-document/05-basic-dom-node-properties/4-where-document-in-hierarchy/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ alert(document.constructor.name); // HTMLDocument
2727
alert(HTMLDocument.prototype.constructor === HTMLDocument); // true
2828
```
2929

30-
Щоб отримати назву класу як рядок, ми можемо використовувати `constructor.name`. Давайте зробимо це для всього прототипного ланцюга `document` аж до класу` Node`:
30+
Щоб отримати назву класу як рядок, ми можемо використовувати `constructor.name`. Давайте зробимо це для всього прототипного ланцюга `document` аж до класу `Node`:
3131

3232
```js run
3333
alert(HTMLDocument.prototype.constructor.name); // HTMLDocument
@@ -37,4 +37,4 @@ alert(HTMLDocument.prototype.__proto__.__proto__.constructor.name); // Node
3737

3838
Це ієрархія.
3939

40-
Ми також можемо розглянути об’єкт за допомогою `console.dir(document)` і побачити ці назви, відкриваючи `__proto__`.Консоль браузера під капотом бере їх з `constructor`.
40+
Ми також можемо розглянути об’єкт за допомогою `console.dir(document)` і побачити ці назви, відкриваючи `__proto__`. Консоль браузера під капотом бере їх з `constructor`.

0 commit comments

Comments
 (0)