Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d97d62a commit 267eec5Copy full SHA for 267eec5
README.md
@@ -2502,16 +2502,26 @@ Other Style Guides
2502
2503
```javascript
2504
// bad
2505
- dragon.age();
2506
-
2507
- // good
2508
- dragon.getAge();
2509
2510
- // bad
2511
- dragon.age(25);
2512
+ class Dragon {
+ get age() {
+ // ...
+ }
+
+ set age(value) {
2513
2514
2515
// good
- dragon.setAge(25);
2516
2517
+ getAge() {
2518
2519
2520
2521
+ setAge(value) {
2522
2523
2524
2525
```
2526
2527
<a name="accessors--boolean-prefix"></a><a name="23.3"></a>
0 commit comments