JSON.stringify([1,2,3].sort()) === JSON.stringify([3,2,1].sort()); //true
或者
[1,2,3].sort().toString() === [3,2,1].sort().toString(); //true