File tree
Expand file treeCollapse file tree1 file changed
+4
-4
lines changed Expand file treeCollapse file tree1 file changed
+4
-4
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -275,24 +275,24 @@ function isClientActive(client) {
|
275 | 275 |
|
276 | 276 | **Bad:**
|
277 | 277 | ```javascript
|
278 |
| -function dateAdd(date, month) { |
| 278 | +function addToDate(date, month) { |
279 | 279 | // ...
|
280 | 280 | }
|
281 | 281 |
|
282 | 282 | const date = new Date();
|
283 | 283 |
|
284 | 284 | // It's hard to to tell from the function name what is added
|
285 |
| -dateAdd(date, 1); |
| 285 | +addToDate(date, 1); |
286 | 286 | ```
|
287 | 287 |
|
288 | 288 | **Good**:
|
289 | 289 | ```javascript
|
290 |
| -function dateAddMonth(date, month) { |
| 290 | +function addMonthToDate(month, date) { |
291 | 291 | // ...
|
292 | 292 | }
|
293 | 293 |
|
294 | 294 | const date = new Date();
|
295 |
| -dateAddMonth(date, 1); |
| 295 | +addMonthToDate(date, 1); |
296 | 296 | ```
|
297 | 297 | **[⬆ back to top](#table-of-contents)**
|
298 | 298 |
|
|
You can’t perform that action at this time.
0 commit comments