am creating one SharePoint hosted app where am creating table from JavaScript and i there are many columns to which i need to set a unique ID am using this code
var itemInfo = '';
var innerHtml = "<table border=1 class='content1'><tr><th> Room </th><th>8:00</th><th>9:00</th><th>10:00</th><th>11:00</th><th>12:00</th><th>13:00</th><th>14:00</th><th>15:00</th><th>16:00</th><th>17:00</th></tr> ";
var enumerator = items.getEnumerator();
var count = 0;
var count = items.get_count();
for (var r = 0; r <= count; r++)
{
for (var c = 0; c <= 10; c++)
{
while (enumerator.moveNext()) {
var currentListItem = enumerator.get_current();
if (currentListItem.get_item('Title') != null) {
innerHtml += "<tr><td id=" + currentListItem.get_item('Room') + ">" + currentListItem.get_item('Room') + "</td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td><td id="+r+c+"></td></tr>";
}
}
}
}
$("#rooms").html(innerHtml);
but here the values of r and c are not getting increament,can any one tell me what's wrong with my code?