code: function equalArray(array1, array2) {
        return (
          array1.length === array2.length &&
          array1.every(function(element, index) {
            return element === array2[index];
          })
        );
      }
docs: Compare two arrays
   
  Compare two arrays
  @param  {Array} array1 Array 1 to compare
  @param  {Array} array2 Array 2 to compare
  @return {Boolean}        Returns true if both arrays are equal