how to format Javascript loop html table
===

my table columns are ` amount, price, value, date, notes ` 

`addCommas` and `round` are formatting functions

inside the `$.ajax({... success:function(store){...` this is my javascript loop to draw the table

    $("#table_a").empty();
										
    var table = '<tbody>';
    $.each(store, function(row, i) {
       table += '<tr>';
       table += '<td><span>' + addCommas(round(i/1000000,2)) + "m" + '</span></td>';
       table += '<td><span>' + i + '</span></td>';
       table += '<td><span>' + "$" + addCommas(round(i/1000000,2)) + "m" + '</span></td>';
       table += '<td><span>' + i + '</span></td>';
       table += '<td><span>' + i + '</span></td>';
       table += '</tr>';
	});
	table += '</tbody>';
	$("#table_a").append(table);

how do I get the loop right to add formatting to the cell data ?
 