Skip to content

Commit 5007041

Browse files
committed
minor
1 parent da3d1bd commit 5007041

File tree

2 files changed

+2
-2
lines changed
  • 1-js/08-prototypes/01-prototype-inheritance

2 files changed

+2
-2
lines changed

1-js/08-prototypes/01-prototype-inheritance/2-search-algorithm/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ importance: 5
66

77
Задача состоит из двух частей.
88

9-
У нас есть объект:
9+
У нас есть объекты:
1010

1111
```js
1212
let head = {

1-js/08-prototypes/01-prototype-inheritance/4-hamster-proto/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Получается, что у хомяков один живот на двоих!
1212

13-
Каждый раз `stomach` берётся из прототипа, `stomach.push` изменяет его "на месте".
13+
И при `lazy.stomach.push(...)` и при `speedy.stomach.push()`, свойство `stomach` берётся из прототипа (так как его нет в самом объекте), затем в него добавляются данные.
1414

1515
Обратите внимание, что этого не происходит при простом присваивании `this.stomach=`:
1616

0 commit comments

Comments
 (0)