fix
This commit is contained in:
parent
77dc1ba4b3
commit
75577f94a4
1 changed files with 1 additions and 3 deletions
|
@ -231,7 +231,7 @@ new User().sayHi(); // Hello
|
||||||
|
|
||||||
## Getters/setters, other shorthands
|
## Getters/setters, other shorthands
|
||||||
|
|
||||||
Just like literal objects, classes may include getters/setters, generators, computed properties etc.
|
Just like literal objects, classes may include getters/setters, computed properties etc.
|
||||||
|
|
||||||
Here's an example for `user.name` implemented using `get/set`:
|
Here's an example for `user.name` implemented using `get/set`:
|
||||||
|
|
||||||
|
@ -298,8 +298,6 @@ class User {
|
||||||
new User().sayHi();
|
new User().sayHi();
|
||||||
```
|
```
|
||||||
|
|
||||||
For a generator method, similarly, prepend it with `*`.
|
|
||||||
|
|
||||||
## Class properties
|
## Class properties
|
||||||
|
|
||||||
```warn header="Old browsers may need a polyfill"
|
```warn header="Old browsers may need a polyfill"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue