如上图所示,一个高效的代码是:

var newArray = arr[0].map(function(col, i) {    return arr.map(function(row) {        return row[i];    });});