Node.js examples for Array:Compare Array
Compare two arrays
Array.prototype.equals = function (array) { for(var i = 0; i < this.length; i++){ if(this[i] != array[i]){ return false; }/*from w w w . j a v a 2 s . com*/ } return true; }