es2015/equals.js
function arrayEquals(array1, array2, traversedValues) {
  if (array1.length !== array2.length) {
    return false
  }
  
  return structureEquals(
    array1,
    array2,
    iteratorToArray(array1.keys()),
    iteratorToArray(array2.keys()),
    (array, key) => array[key],
    traversedValues
  )
}
function arrayEquals(array1, array2, traversedValues) {
  if (array1.length !== array2.length) {
    return false
  }
  
  return structureEquals(
    array1,
    array2,
    iteratorToArray(array1.keys()),
    iteratorToArray(array2.keys()),
    (array, key) => array[key],
    traversedValues
  )
}
function arrayEquals ( array1 , array2 , traversedValues ) { if ( array1 . length !== array2 . length ) { return false } return structureEquals ( array1 , array2 , iteratorToArray ( array1 . keys ( ) ) , iteratorToArray ( array2 . keys ( ) ) , ( array , key ) => array [ key ] , traversedValues ) }
Compares the two provided arrays.

@param {*[]} array1 The 1st array to compare.
@param {*[]} array2 The 2nd array to compare.
@param {Map<Object, Object>} traversedValues A map of non-primitive values
traversed in the first structure to their equal counterparts in the
second structure.
@return {boolean} {@code true} if the arrays are equal.
Compares the two provided arrays .