16 lines
345 B
JavaScript
16 lines
345 B
JavaScript
module.exports = {
|
|
arraysDiffer: function (arrayA, arrayB) {
|
|
var isDifferent = false;
|
|
if (arrayA.length !== arrayB.length) {
|
|
isDifferent = true;
|
|
} else {
|
|
arrayA.forEach(function (item, index) {
|
|
if (item !== arrayB[index]) {
|
|
isDifferent = true;
|
|
}
|
|
});
|
|
}
|
|
return isDifferent;
|
|
}
|
|
};
|