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
const transpose = array => array[0].map((r, i) => array.map(c => c[i])); console.log(transpose([[2, 3, 4], [5, 6, 7]]));