From df08382ae3f306089e38b98de3f1d08c808417bd Mon Sep 17 00:00:00 2001 From: slwyts Date: Tue, 1 Nov 2022 10:27:49 +0800 Subject: [PATCH] Update README.zh-CN.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加规则:"使用你的母语作为变量名/函数名" --- README.zh-CN.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.zh-CN.md b/README.zh-CN.md index 7bce7ac..25fed1a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -55,6 +55,23 @@ _Bad 👎🏻_ let windowWidth = 640; let windowHeight = 480; ``` +### 💩 使用你的母语作为变量名/函数名 +方便自己阅读 + +_Good 👍🏻_ + +```javascript +let 窗口宽度 = 1280; +let 窗口高度 = 720; +let ширинаокна = 1280; +let высотаWindow = 720; +``` +_Bad 👎🏻_ + +```javascript +let windowWidth = 1280; +let windowHeight = 720; +``` ### 💩 不要写注释