Browse Source

Add more principles.

pull/5/head
Oleksii Trekhleb 5 years ago
parent
commit
2efb2ff0e9
  1. 22
      README.md

22
README.md

@ -178,6 +178,28 @@ function square(num) {
x = square(x); // Now x is 25. x = square(x); // Now x is 25.
``` ```
### 💩 Create variables that you're not going to use.
Just in case.
_Good 👍🏻_
```javascript
function sum(a, b, c) {
const timeout = 1300;
const result = a + b;
return a + b;
}
```
_Bad 👎🏻_
```javascript
function sum(a, b) {
return a + b;
}
```
### 💩 Triangle principle ### 💩 Triangle principle
Be like a bird - nest, nest, nest. Be like a bird - nest, nest, nest.

Loading…
Cancel
Save