Browse Source

feat: add flag boolean (#8)

pull/9/head
Jiajun Chen 5 years ago
committed by GitHub
parent
commit
2eba5ff456
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      README.md

17
README.md

@ -366,6 +366,23 @@ package.json
package-lock.json
```
### 💩 Always name your boolean value 'flag'
Leave the space for your colleagues to think what the boolean value means.
_Good 👍🏻_
```javascript
let flag = true
```
_Bad 👎🏻_
```javascript
let isDone = false
let isEmpty = false
```
### 💩 Long-read functions are better than short ones.
Don't divide a program logic into readable pieces. What if your IDE's search brakes and you will not be able to find the necessary file or function?

Loading…
Cancel
Save