File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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
812812JavaScript, as it provides you with static typing on top of standard JavaScript
813813syntax. The problem with manually type-checking normal JavaScript is that
814814doing 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
816816good tests, and have good code reviews. Otherwise, do all of that but with
817817TypeScript (which, like I said, is a great alternative!).
818818
@@ -846,8 +846,8 @@ they are fixed if they can be.
846846**Bad:**
847847` ` ` javascript
848848
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.
851851for (let i = 0 , len = list .length ; i < len; i++ ) {
852852 // ...
853853}
You can’t perform that action at this time.
0 commit comments