From 1885f46db0f79f88010c4ced85d196afeff6508d Mon Sep 17 00:00:00 2001 From: Yousazoe <961652168@qq.com> Date: Wed, 21 Jul 2021 20:08:45 +0800 Subject: [PATCH] Update README.zh-CN.md add "Always name your boolean value a flag" Chinese translation --- README.zh-CN.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.zh-CN.md b/README.zh-CN.md index 7bce7ac..2c974de 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -367,6 +367,27 @@ package.json package-lock.json ``` + + +### πŸ’© ε°½ε―θƒ½ε°†δ½ ηš„εΈƒε°”ε€Όε‘½εδΈΊ `flag` + +δΈΊδ½ ηš„εŒδΊ‹η•™ε‡Ίη©Ίι—΄ζ€θ€ƒθΏ™δΊ›εΈƒε°”ε˜ι‡ηš„ε«δΉ‰γ€‚ + +_Good πŸ‘πŸ»_ + +```javascript +let flag = true; +``` + +_Bad πŸ‘ŽπŸ»_ + +```javascript +let isDone = false; +let isEmpty = false; +``` + + + ### πŸ’© ε‡½ζ•°ι•Ώηš„ζ―”ηŸ­ηš„ε₯½ δΈθ¦ζŠŠη¨‹εΊι€»θΎ‘εˆ†ζˆε―θ―»ηš„ιƒ¨εˆ†γ€‚ε¦‚ζžœIDEηš„ζœη΄’εœζ­’οΌŒθ€Œζ‚¨ζ— ζ³•ζ‰Ύεˆ°ζ‰€ιœ€ηš„ζ–‡δ»Άζˆ–ε‡½ζ•°οΌŒθ―₯ζ€ŽδΉˆεŠž?