commit
bd6052f591
1 changed files with 1 additions and 1 deletions
|
@ -264,7 +264,7 @@ class User {
|
||||||
let user = new User("John");
|
let user = new User("John");
|
||||||
alert(user.name); // John
|
alert(user.name); // John
|
||||||
|
|
||||||
user = new User(""); // Name too short.
|
user = new User(""); // Name is too short.
|
||||||
```
|
```
|
||||||
|
|
||||||
The class declaration creates getters and setters in `User.prototype`, like this:
|
The class declaration creates getters and setters in `User.prototype`, like this:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue