Code Is Never Die !
var arr1=["11","22","33"]; var arr2=["11","33","44"];
var arr_status;
if(arr1.length == arr2.length){ for (var x = 0; x < arr1.length; x++) { arr_status = 1; if (arr2[x] != arr1[x]) { arr_status = 0; break; } } }else{ arr_status = 0 }
if (arr_status == 1) { console.log("相等"); }else{ console.log("不相等"); }
|
PS: 博主博客主页(Rainux),精彩继续,欢迎来访!