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 0951bc2 commit 7fe566cCopy full SHA for 7fe566c
README.md
@@ -927,27 +927,6 @@ const bankAccount = new BankAccount();
927
bankAccount.balance -= 100;
928
```
929
930
-**Good**:
931
-```javascript
932
-class BankAccount {
933
- constructor() {
934
- this.balance = 1000;
935
- }
936
-
937
- // It doesn't have to be prefixed with `get` or `set` to be a getter/setter
938
- withdraw(amount) {
939
- if (verifyAmountCanBeDeducted(amount)) {
940
- this.balance -= amount;
941
942
943
-}
944
945
-const bankAccount = new BankAccount();
946
947
-// Buy shoes...
948
-bankAccount.withdraw(100);
949
-```
950
951
**Good**:
952
```javascript
953
class BankAccount {
0 commit comments