From 2efb2ff0e9046aae5ef8e8004791a4fc7c7614ba Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Wed, 29 Jan 2020 06:29:37 +0100 Subject: [PATCH] Add more principles. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 99e5e43..482b10f 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,28 @@ function square(num) { 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 Be like a bird - nest, nest, nest.