B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Compares two arrays, and returns true if they are equal.
 *
 * @param aArray1
 *        First array to compare.
 * @param aArray2
 *        Second array to compare.
 */
Compares two arrays, and returns true if they are equal.
@param aArray1
First array to compare.
@param aArray2
Second array to compare.
Compares two arrays and returns true if they are equal . @param aArray1 First array to compare . @param aArray2 Second array to compare .
function compareArrays(aArray1, aArray2) {
  if (aArray1.length != aArray2.length) {
    print("compareArrays: array lengths differ\n");
    return false;
  }
  for (let i = 0; i < aArray1.length; i++) {
    if (aArray1[i] != aArray2[i]) {
      print("compareArrays: arrays differ at index " + i + ": " +
            "(" + aArray1[i] + ") != (" + aArray2[i] +")\n");
      return false;
    }
  }
  return true;
}
function compareArrays ( aArray1 , aArray2 ) { if ( aArray1 . length != aArray2 . length ) { print ( "compareArrays: array lengths differ\n" ) ; return false ; } for ( let i = 0 ; i < aArray1 . length ; i ++ ) { if ( aArray1 [ i ] != aArray2 [ i ] ) { print ( "compareArrays: arrays differ at index " + i + ": " + "(" + aArray1 [ i ] + ") != (" + aArray2 [ i ] + ")\n" ) ; return false ; } } return true ; }
Compares two arrays, and returns true if they are equal.
Compares two arrays and returns true if they are equal .