Simple JavaScript HTML table generator
Since position is a number, you can simplify your columnSorter function. It becomes a one-liner, so you could even do:

columnArray.sort(function(a, b) { return a.position - b.position; });


Note though that some people consider this less readable. It's definitely less explicit in what it does, so you may wish to explain it in a comment.
You're using a for..in construct. This will give unexpected results if I extend Array.prototype. Either use a regular for loop, or check for columnArray.hasOwnProperty(col) in each iteration.
Why add an empty &lt;tfoot&gt;?
You're closing your &lt;thead&gt; in the wrong spot. &lt;tbody&gt; and &lt;tfoot&gt; should be children of &lt;table&gt;, not children of &lt;thead&gt;, so close your &lt;thead&gt; earlier.
It doesn't make much sense to return x += y;. Either return x + y;, or do x += y; return x;.