Skip to content

Commit ad29269

Browse files
committed
Only comment things that have business logic complexity
1 parent 725d2b2 commit ad29269

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README-zh-CN.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,10 +2209,12 @@ review.perfReview();
22092209
**[⬆ 返回顶部](#代码整洁的-javascript)**
22102210

22112211
## **评论**
2212-
### Only comment things that have business logic complexity.
2212+
### 仅仅对包含复杂业务逻辑的东西进行评论
22132213
Comments are an apology, not a requirement. Good code *mostly* documents itself.
22142214

2215-
**Bad:**
2215+
评论是代码的辩解, 不是要求。 多数情况下, 好的代码就是文档。
2216+
2217+
**不好的:**
22162218
```javascript
22172219
function hashIt(data) {
22182220
// The hash
@@ -2233,7 +2235,7 @@ function hashIt(data) {
22332235
}
22342236
```
22352237

2236-
**Good**:
2238+
**好的:**
22372239
```javascript
22382240

22392241
function hashIt(data) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy