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
Copy file name to clipboardExpand all lines: 1-js/07-object-properties/02-property-accessors/article.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,8 @@ alert(user.fullName); // John Smith
55
55
56
56
Снаружи свойство-аксессор выглядит как обычное свойство. В этом и заключается смысл свойств-аксессоров. Мы не *вызываем*`user.fullName` как функцию, а *читаем* как обычное свойство: геттер выполнит всю работу за кулисами.
57
57
58
+
На данный момент у `FullName` есть только геттер. Если мы попытаемся назначить `user.FullName=`, произойдёт ошибка:
0 commit comments