mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Minor var order juggle in compact.
This commit is contained in:
@@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
function compact(array) {
|
function compact(array) {
|
||||||
let index = -1
|
let index = -1
|
||||||
const length = array == null ? 0 : array.length
|
|
||||||
let resIndex = 0
|
let resIndex = 0
|
||||||
|
const length = array == null ? 0 : array.length
|
||||||
const result = []
|
const result = []
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user