File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ you should consider using TypeScript. It is an excellent alternative to normal
812
812
JavaScript, as it provides you with static typing on top of standard JavaScript
813
813
syntax. The problem with manually type-checking normal JavaScript is that
814
814
doing it well requires so much extra verbiage that the faux "type-safety" you get
815
- doesn't make up for the lost readability. Keep your JavaScript, clean, write
815
+ doesn't make up for the lost readability. Keep your JavaScript clean, write
816
816
good tests, and have good code reviews. Otherwise, do all of that but with
817
817
TypeScript (which, like I said, is a great alternative!).
818
818
@@ -846,8 +846,8 @@ they are fixed if they can be.
846
846
**Bad:**
847
847
` ` ` javascript
848
848
849
- // On old browsers, each iteration would be costly because `len ` would be
850
- // recomputed . In modern browsers, this is optimized.
849
+ // On old browsers, each iteration with uncached `list.length ` would be costly
850
+ // because of `list.length` recomputation . In modern browsers, this is optimized.
851
851
for (let i = 0 , len = list .length ; i < len; i++ ) {
852
852
// ...
853
853
}
You can’t perform that action at this time.
0 commit comments