Here is what I have written:
var data = [["Jan","Feb","Mar"],["5","10","15"]];
var strTable = '<table>';
for (var i = 0; i < data.length; i++) {
strTable += '<tr' + ((i % 2) ? ' class="odd"' : '') + '>';
for (var j = 0; j < data[i].length; j++) {
strTable += '<td>' + data[i][j] + '</td>';
}
strTable += '</tr>';
}
strTable += '</table>';
Which produces a table like so:
Jan | Feb | Mar
5 | 10 | 15
However I need to change this so that it produces:
Jan | 5
Feb | 10
Mar | 15
I am having a hard time trying to change the javascript around. Can anyone help?