https://stackoverflow.com/a/36164530
transpose = m => m[0].map((x,i) => m.map(x => x[i])) // or function transpose(matrix) { return matrix.reduce((prev, next) => next.map((item, i) => (prev[i] || []).concat(next[i]) ), []); }
498500cookie-checkJavascript transpose