Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cea298d + ce9f41f commit 50e5c1bCopy full SHA for 50e5c1b
README.md
@@ -79,19 +79,22 @@ can help identify unnamed constants.
79
80
**Bad:**
81
```javascript
82
-// What the heck is 525600 for?
83
-for (let i = 0; i < 525600; i++) {
84
- runCronJob();
85
-}
+// What the heck is 86400 for?
+setTimeout(() => {
+ this.blastOff()
+}, 86400);
86
+
87
```
88
89
**Good**:
90
91
// Declare them as capitalized `const` globals.
-const MINUTES_IN_A_YEAR = 525600;
92
-for (let i = 0; i < MINUTES_IN_A_YEAR; i++) {
93
94
+const SECONDS_IN_DAY = 86400;
95
96
+}, SECONDS_IN_A_DAY);
97
98
99
**[⬆ back to top](#table-of-contents)**
100
0 commit comments