comparing two 2d arrays in jquery
问题 I'm trying to compare two arrays both 2d, I need it only match when they're completely identical. The code I have is too lengthly, as the arrays will potentially be far longer. I tried playing with .each() and for loops but it get's very messy and won't compare every array. var solution=[ [0,0,0], [0,0,1], [0,0,1]]; var value=[ [0,0,0], [0,0,1], [0,0,1]]; //compare arrays if (solution[0][0]==value[0][0] && solution[0][1]==value[0][1] && solution[0][2]==value[0][2] && solution[1][0]==value[1]