Say I have an array
var originalArray = [1,2,3,4,5,6,7]
I want to display to apply
function orderToColumn (originalArray, numberofcolumn) to get a return value like so
Array [ 1, 4, 7, 2, 5, undefined, 3, 6, undefined ]
the point being I want to be able to display my array in the following format:
1 4 7
2 5
3 6
Heres my attempt so far: https://jsfiddle.net/042o7rv9/
The array could be of any size and the numberofcolumn>=1.
originalArrayalways start with1and is it always sorted? In other words, why is there no gap for the missing0?