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 @@ -836,7 +836,7 @@ you should consider using TypeScript. It is an excellent alternative to normal
836
836
JavaScript, as it provides you with static typing on top of standard JavaScript
837
837
syntax. The problem with manually type-checking normal JavaScript is that
838
838
doing it well requires so much extra verbiage that the faux "type-safety" you get
839
- doesn't make up for the lost readability. Keep your JavaScript, clean, write
839
+ doesn't make up for the lost readability. Keep your JavaScript clean, write
840
840
good tests, and have good code reviews. Otherwise, do all of that but with
841
841
TypeScript (which, like I said, is a great alternative!).
842
842
@@ -870,8 +870,8 @@ they are fixed if they can be.
870
870
** Bad:**
871
871
``` javascript
872
872
873
- // On old browsers, each iteration would be costly because `len ` would be
874
- // recomputed . In modern browsers, this is optimized.
873
+ // On old browsers, each iteration with uncached `list.length ` would be costly
874
+ // because of `list.length` recomputation . In modern browsers, this is optimized.
875
875
for (var i = 0 , len = list .length ; i < len; i++ ) {
876
876
// ...
877
877
}
You can’t perform that action at this time.
0 commit comments