Here you can find the source of compare(array)
Array.prototype.compare = function (array) { if (!array)/*from w w w. j a va 2s .c o m*/ return false; if (this.length != array.length) return false; for (var i = 0; i < this.length; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; } else if (this[i] != array[i]) { return false; } } return true; };
Array.prototype.compare = function (array) { if (!array) return false; if (this.length != array.length) return false; for (var i = 0; i < this.length; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; ...
Array.prototype.compare = function (array) { if (!array) return false; if (this.length != array.length) return false; for (var i = 0; i < this.length; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; ...
Array.prototype.compare = function (array) { if (!array) return false; if (this.length != array.length) return false; for (var i = 0, l=this.length; i < l; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; ...
Array.prototype.compare = function (array) { if (!array) return false; if (this.length != array.length) return false; for (var i = 0; i < this.length; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; ...
Array.prototype.compare = function (array) { if (!array) return false; if (this.length != array.length) return false; for (var i = 0; i < this.length; i++) { if (this[i] instanceof Array && array[i] instanceof Array) { if (!this[i].compare(array[i])) return false; ...
Array.prototype.compare = function(other) { return this.join('') == other.join(''); };
Array.prototype.compare = function(secondArray, compareFunction){ if(this.length != secondArray.length){ return false; for(var i = 0; i < this.length; i++){ if(this[i] instanceof Array && secondArray instanceof Array){ this[i].compare(secondArray[i]); }else if(this[i] instanceof Object && secondArray instanceof Object){ if(!compareFunction(this[i], secondArray[i])){ ...
Array.prototype.compare = function(testArr) { if (this.length != testArr.length) return false; for (var i = 0; i < testArr.length; i++) { if (this[i].compare) { if (!this[i].compare(testArr[i])) return false; if (this[i] !== testArr[i]) return false; return true; ...
Array.prototype.compare = function(testArr) { if (this.length != testArr.length) return false; for (var i = 0; i < testArr.length; i++) { if (this[i].compare) { if (!this[i].compare(testArr[i])) return false; }; if (this[i] !== testArr[i]) return false; }; return true; ...