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
function invertArray(array,arrayWidth,arrayHeight) { var newArray = []; for (x=0;x