1function arraysAreIdentical(arr1, arr2){
2 if (arr1.length !== arr2.length) return false;
3 for (var i = 0, len = arr1.length; i < len; i++){
4 if (arr1[i] !== arr2[i]){
5 return false;
6 }
7 }
8 return true;
9}
1const arr1 = [1, 2, 3];
2const arr2 = [1, 3, 3];
3
4if (arr1.length !== arr2.length) return console.log("false");
5for (let i = 0; i < arr1.length; i++) {
6 for (let j = 0; j < arr2.length; j++) {
7 if (arr1[i] === arr2[j]) {
8 console.log("yes match", arr1[i], arr2[j]);
9 continue;
10 }
11 console.log("no match", arr1[i], arr2[j]);
12 }
13}