This commit is contained in:
Dave Dixon 2019-05-09 06:58:18 -07:00 committed by GitHub
parent 11b1671764
commit 2addc4ca72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ alert(user.surname); // Cooper
Now we have a "virtual" property. It is readable and writable, but in fact does not exist.
```smart header="Accessor properties are only accessible with get/set"
Once a property is defined with `get prop()` or `set prop()`, it's an accessor property, not a data properety any more.
Once a property is defined with `get prop()` or `set prop()`, it's an accessor property, not a data property any more.
- If there's a getter -- we can read `object.prop`, otherwise we can't.
- If there's a setter -- we can set `object.prop=...`, otherwise we can't.