It was not mentioned earlier in the article that “A property can be either an accessor (has get/set methods) or a data property (has a value), not both”

So,we should not say "once again".
This commit is contained in:
zhangbao 2020-01-09 18:16:25 +08:00 committed by GitHub
parent a4a84083a7
commit 4489949ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ alert(user.fullName); // John Smith
for(let key in user) alert(key); // name, surname
```
Please note once again that a property can be either an accessor (has `get/set` methods) or a data property (has a `value`), not both.
Please note that a property can be either an accessor (has `get/set` methods) or a data property (has a `value`), not both.
If we try to supply both `get` and `value` in the same descriptor, there will be an error: