Skip to content

Commit c1ae482

Browse files
committed
minor
1 parent 98a5bb3 commit c1ae482

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

1-js/08-prototypes/01-prototype-inheritance/article.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ alert(admin.fullName); // John Smith (*)
197197

198198
// срабатывает сеттер!
199199
admin.fullName = "Alice Cooper"; // (**)
200+
alert(admin.name); // Alice
201+
alert(admin.surname); // Cooper
200202
```
201203

202204
Здесь в строке `(*)` свойство `admin.fullName` имеет геттер в прототипе `user`, поэтому вызывается он. В строке `(**)` свойство также имеет сеттер в прототипе, который и будет вызван.

0 commit comments

Comments
 (0)