mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Use const and let for var declaration in baseEach and baseEachRight.
This commit is contained in:
@@ -16,9 +16,9 @@ function baseEach(collection, iteratee) {
|
||||
if (!isArrayLike(collection)) {
|
||||
return baseForOwn(collection, iteratee)
|
||||
}
|
||||
var length = collection.length,
|
||||
index = -1,
|
||||
iterable = Object(collection)
|
||||
const length = collection.length
|
||||
const iterable = Object(collection)
|
||||
let index = -1
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(iterable[index], index, iterable) === false) {
|
||||
|
||||
@@ -16,8 +16,8 @@ function baseEachRight(collection, iteratee) {
|
||||
if (!isArrayLike(collection)) {
|
||||
return baseForOwnRight(collection, iteratee)
|
||||
}
|
||||
var length = collection.length,
|
||||
iterable = Object(collection)
|
||||
const iterable = Object(collection)
|
||||
let length = collection.length
|
||||
|
||||
while (length--) {
|
||||
if (iteratee(iterable[length], length, iterable) === false) {
|
||||
|
||||
Reference in New Issue
Block a user