transposé !



const A = [
  [1,3,5],
  [2,4,6]
];

let At = A[0].map( (_,col) => A.map( (lig,_) =>lig[col]));

console.log(`|${A.join("|\n|")}| `) ;

console.log(`|${At.join("|\n|")}| `) ;