var equalArrays = function (array, compareArray) {
var i, len = array.length;
if (len !== compareArray.length) {
return false;
}
for (i = 0; i < len; i += 1) {
if (array[i] !== compareArray[i]) {
return false;
}
}
return true;
};
diff = function (a1, a2) {
return a1.filter(function(i) {return a2.indexOf(i) < 0;})
.concat(a2.filter(function(i) {return a1.indexOf(i) < 0;}))
}
compare = function (a1, a2) {
return a1.length == a2.length && a1.every(function(v,i) { return v === a2[i]})
}