Skip to content

Commit e52a615

Browse files
committed
[arrays] believe in push.
1 parent fe0ab66 commit e52a615

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,6 @@
112112
var items = [];
113113
```
114114
115-
- When you are managing array length use direct assignment over Array#push. [jsPerf](http://jsperf.com/array-direct-assignment-vs-push/11)
116-
117-
```javascript
118-
var hundredOdds = [],
119-
i;
120-
121-
// bad
122-
for (i = 0; i < 100; i++) {
123-
hundredOdds.push(i * 2 + 1);
124-
}
125-
126-
// good
127-
for (i = 0; i < 100; i++) {
128-
hundredOdds[i] = i * 2 + 1;
129-
}
130-
```
131-
132115
- If you don't know array length use Array#push.
133116

134117
```javascript

0 commit comments

Comments
 (0)