Skip to content

Commit e7ef70e

Browse files
Merge pull request ryanmcdermott#120 from JakoD/master
"Use searchable names" and correct unit of time
2 parents 383dd49 + 05089ba commit e7ef70e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ can help identify unnamed constants.
7979

8080
**Bad:**
8181
```javascript
82-
// What the heck is 86400 for?
82+
// What the heck is 86400000 for?
8383
setTimeout(() => {
8484
this.blastOff()
85-
}, 86400);
85+
}, 86400000);
8686

8787
```
8888

8989
**Good**:
9090
```javascript
9191
// Declare them as capitalized `const` globals.
92-
const SECONDS_IN_A_DAY = 86400;
92+
const MILLISECONDS_IN_A_DAY = 86400000;
9393

9494
setTimeout(() => {
9595
this.blastOff()
96-
}, SECONDS_IN_A_DAY);
96+
}, MILLISECONDS_IN_A_DAY);
9797

9898
```
9999
**[⬆ back to top](#table-of-contents)**

0 commit comments

Comments
 (0)