Apply even more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-09 12:23:34 -08:00
parent e6152a97e8
commit dc687c1d85
177 changed files with 433 additions and 437 deletions

View File

@@ -14,13 +14,13 @@
* // => [1, 2, 3]
*/
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
let index = -1;
const length = array == null ? 0 : array.length;
let resIndex = 0;
const result = [];
while (++index < length) {
var value = array[index];
const value = array[index];
if (value) {
result[resIndex++] = value;
}