You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -325,7 +325,6 @@ createMenu(menuConfig);
325
325
**[⬆ back to top](#table-of-contents)**
326
326
327
327
328
-
329
328
### Don't use flags as function parameters
330
329
Flags tell your user that this function does more than one thing. Functions should do one thing. Split out your functions if they are following different code paths based on a boolean.
331
330
@@ -379,7 +378,6 @@ function splitIntoFirstAndLastName() {
379
378
}
380
379
381
380
console.log(name); // ['Ryan', 'McDermott'];
382
-
383
381
```
384
382
385
383
**Good**:
@@ -622,6 +620,32 @@ function combine(val1, val2) {
622
620
```
623
621
**[⬆ back to top](#table-of-contents)**
624
622
623
+
### Don't over-optimize
624
+
Modern browsers do a lot of optimization under-the-hood at runtime. A lot of
625
+
times, if you are optimizing then you are just wasting your time. [There are good
0 commit comments