Convert remaining vars to let/const.

This commit is contained in:
John-David Dalton
2017-01-09 13:53:41 -08:00
parent 40e9c66ca6
commit c2208f82dc
12 changed files with 37 additions and 21 deletions

View File

@@ -11,10 +11,12 @@ import isSymbol from './isSymbol.js';
* @returns {*} Returns the extremum value.
*/
function baseExtremum(array, iteratee, comparator) {
let result;
let index = -1;
const length = array.length;
while (++index < length) {
let computed;
const value = array[index];
const current = iteratee(value);
@@ -22,8 +24,8 @@ function baseExtremum(array, iteratee, comparator) {
? (current === current && !isSymbol(current))
: comparator(current, computed)
)) {
var computed = current,
result = value;
computed = current;
result = value;
}
}
return result;