I\'ve got an array of arrays, something like:
[ [1,2,3], [1,2,3], [1,2,3], ]
I would like to transpose it to get the following
ES6 1liners as :
let invert = a => a[0].map((col, c) => a.map((row, r) => a[r][c]))
so same as Óscar's, but as would you rather rotate it clockwise :
let rotate = a => a[0].map((col, c) => a.map((row, r) => a[r][c]).reverse())