var arr = [[1, 2, 3], [7, 2, 3], [3, 2, 3]]; arr.sort(function(x, y){ //return x[key].localeCompare(y[key]);//中文可以用这个 return x[0] – y[0]; });
var arr = [[1, 2, 3], [7, 2, 3], [3, 2, 3]]; arr.sort(function(x, y){ //return x[key].localeCompare(y[key]);//中文可以用这个 return x[0] – y[0]; });