dynamic table building
<p>I'm building a html table dynamically, using an array of values. I'm wanting to create this table, starting with the first column, moving right. For example, I have the array:</p>

<pre><code>['a', 'b', 'c', 'd', 'e', 'f']
</code></pre>

<p>My table should look like this:</p>

<pre><code>a   c   e
b   d   f
</code></pre>

<p>If i have defined the number of columns I wish to use, I loop <code>Math.ceil(array.length / number_of_columns)</code> number of times to get each row. Within that loop, I loop <code>number_of_columns</code> times to get each column. To find out with value in the array I need I use this formula: <code>array_index = (row_column_number * number_of_rows) + row_number</code>. Is that a correct formula? Also, is this the best way of doing this?</p>
