一只名叫tom的猫
function trans (arr) { let result = [] arr.forEach(item => { item.forEach((d, i)=> { let a = result[i] = result[i] || [] a.push(d) }) }) return result}trans([[1,2,3,4],[1,2,3,4]]) // [[1,1],[2,2],[3,3],[4,4]]